From 8781da58869ee18b207f5dc20050a5ba799d93ee Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Mon, 12 Nov 2018 11:42:41 -0800 Subject: [PATCH] Use chunkhash/hash (contenthash added in webpack 4) --- .../src/config/webpack/webpack.config.client.js | 10 +++++----- .../src/config/webpack/webpack.config.server.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/gluestick/src/config/webpack/webpack.config.client.js b/packages/gluestick/src/config/webpack/webpack.config.client.js index 7e4421c64..67d8880de 100644 --- a/packages/gluestick/src/config/webpack/webpack.config.client.js +++ b/packages/gluestick/src/config/webpack/webpack.config.client.js @@ -65,8 +65,8 @@ module.exports = ( output: { path: outputPath, // filesystem path for static files publicPath: `/${publicPath}/`.replace(/\/\//g, '/'), // network path for static files - filename: '[name].[contenthash].js', // file name pattern for entry scripts - chunkFilename: '[name].[contenthash].js', // file name pattern for chunk scripts + filename: '[name].[chunkhash].js', // file name pattern for entry scripts + chunkFilename: '[name].[chunkhash].js', // file name pattern for chunk scripts }, module: { rules: [ @@ -110,7 +110,7 @@ module.exports = ( { loader: 'file-loader', options: { - name: '[name]-[contenthash].[ext]', + name: '[name]-[hash].[ext]', }, }, { @@ -126,7 +126,7 @@ module.exports = ( { loader: 'file-loader', options: { - name: '[name]-[contenthash].[ext]', + name: '[name]-[hash].[ext]', }, }, ], @@ -144,7 +144,7 @@ module.exports = ( new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: `vendor${process.env.NODE_ENV === 'production' - ? '-[contenthash]' + ? '-[chunkhash]' : ''}.bundle.js`, }), ].filter(Boolean), diff --git a/packages/gluestick/src/config/webpack/webpack.config.server.js b/packages/gluestick/src/config/webpack/webpack.config.server.js index 9185d2d2e..469be5c37 100644 --- a/packages/gluestick/src/config/webpack/webpack.config.server.js +++ b/packages/gluestick/src/config/webpack/webpack.config.server.js @@ -122,7 +122,7 @@ module.exports = ( { loader: 'file-loader', options: { - name: '[name]-[contenthash].[ext]', + name: '[name]-[hash].[ext]', emitFile: false, }, }, @@ -139,7 +139,7 @@ module.exports = ( { loader: 'file-loader', options: { - name: '[name]-[contenthash].[ext]', + name: '[name]-[hash].[ext]', emitFile: false, }, },