Webpack: only use [chunkhash] and [contenthash] in production builds

https://webpack.js.org/guides/build-performance/#avoid-production-specific-tooling
This commit is contained in:
Alex Gleason
2022-09-30 12:03:10 -05:00
parent ce255b7ded
commit d162bc5d17
2 changed files with 10 additions and 3 deletions

View File

@@ -52,9 +52,9 @@ module.exports = {
},
output: {
filename: 'packs/js/[name]-[chunkhash].js',
chunkFilename: 'packs/js/[name]-[chunkhash].chunk.js',
hotUpdateChunkFilename: 'packs/js/[id]-[contenthash].hot-update.js',
filename: 'packs/js/[name].js',
chunkFilename: 'packs/js/[name].chunk.js',
hotUpdateChunkFilename: 'packs/js/[id].hot-update.js',
path: output.path,
publicPath: join(FE_SUBDIRECTORY, '/'),
},