From 52bd9eabb65e8ec0d80a18f1d7b71bb35dfd4959 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Thu, 24 Nov 2016 02:36:08 +0100 Subject: [PATCH] Don't add `commons` chunk in prod --- js/webpack.config.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/js/webpack.config.js b/js/webpack.config.js index 68c1467d8..4cc7a45b1 100644 --- a/js/webpack.config.js +++ b/js/webpack.config.js @@ -179,7 +179,7 @@ module.exports = { filename: 'index.html', template: './index.ejs', favicon: FAVICON, - chunks: [ 'commons', 'index' ] + chunks: [ isProd ? null : 'commons', 'index' ] }) ]; @@ -190,7 +190,7 @@ module.exports = { template: './dapps/index.ejs', favicon: FAVICON, secure: dapp.secure, - chunks: [ 'commons', dapp.name ] + chunks: [ isProd ? null : 'commons', dapp.name ] }); }).forEach((plugin) => plugins.push(plugin)); @@ -204,13 +204,6 @@ module.exports = { } if (isProd) { - plugins.push( - new webpack.optimize.CommonsChunkPlugin({ - chunks: ['index'], - name: 'commons' - }) - ); - plugins.push(new webpack.optimize.OccurrenceOrderPlugin(false)); plugins.push(new webpack.optimize.DedupePlugin()); plugins.push(new webpack.optimize.UglifyJsPlugin({