Skip to content

Commit

Permalink
BC-8017 - Enable Cache Busting via Content Hash in Frontend (#3395)
Browse files Browse the repository at this point in the history
* add content hash to webpack build

* add chunk content hash
  • Loading branch information
uidp authored Sep 5, 2024
1 parent 01f0919 commit c495d68
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ module.exports = {
},

// Output
output: {
filename: "_nuxt/js/[name].js",
path: path.resolve(__base, "dist"),
publicPath: "/",
chunkFilename: "_nuxt/js/[name].js",
clean: true,
},
output:
process.env.NODE_ENV === "development"
? {}
: {
filename: "_nuxt/js/[name]-[contenthash:6].js",
chunkFilename: "_nuxt/js/[name]-[contenthash:6].js",
path: path.resolve(__base, "dist"),
publicPath: "/",
clean: true,
},

// Optimizations
optimization: {
Expand Down

0 comments on commit c495d68

Please sign in to comment.