From 19086f84576f75a600bb4afd013e67967013119b Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Mon, 1 Oct 2018 16:00:56 +0200 Subject: [PATCH 1/2] Add webpack named modules plugin into build We need consistent module indexes within our build to be able to use chunkhash for file names [MAILPOET-1548] --- webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.config.js b/webpack.config.js index 6ffe1b0e71..28e8138ace 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -480,6 +480,7 @@ module.exports = _.map([adminConfig, publicConfig, migratorConfig, testConfig], if (config.name !== 'test') { config.plugins = config.plugins || []; config.plugins.push( + new webpack.NamedModulesPlugin(), new webpackMD5HashPlugin(), new webpackManifestPlugin({ cache: manifestCache From 5a13ed746f2293f722cd5338c24b6fe7efbeca20 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Tue, 2 Oct 2018 09:51:34 +0200 Subject: [PATCH 2/2] Use hash of whole build instead of named modules and chunkhash [MAILPOET-1548] --- webpack.config.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 28e8138ace..a0665c7660 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,8 +18,8 @@ var baseConfig = { }, output: { path: path.join(__dirname, 'assets/js'), - filename: (PRODUCTION_ENV) ? '[name].[chunkhash:8].js' : '[name].js', - chunkFilename: (PRODUCTION_ENV) ? '[name].[chunkhash:8].chunk.js' : '[name].chunk.js' + filename: (PRODUCTION_ENV) ? '[name].[hash:8].js' : '[name].js', + chunkFilename: (PRODUCTION_ENV) ? '[name].[hash:8].chunk.js' : '[name].chunk.js' }, resolve: { modules: [ @@ -480,7 +480,6 @@ module.exports = _.map([adminConfig, publicConfig, migratorConfig, testConfig], if (config.name !== 'test') { config.plugins = config.plugins || []; config.plugins.push( - new webpack.NamedModulesPlugin(), new webpackMD5HashPlugin(), new webpackManifestPlugin({ cache: manifestCache