From d885edec88fcfee6184e4519fe18f70a2e3e03e2 Mon Sep 17 00:00:00 2001 From: Mats Pfeiffer Date: Tue, 5 Dec 2017 16:37:36 +0100 Subject: [PATCH] fix(webpack): Reorder common chunk plugin calls --- webpack.common.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index f6695cb73..bb4100184 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -76,8 +76,10 @@ module.exports = { plugins: [ new CleanWebpackPlugin(['dist']), new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - minChunks: Infinity + name: 'vendor', + minChunks: function (module) { + return module.context && module.context.indexOf('node_modules') !== -1 + } }), new webpack.optimize.CommonsChunkPlugin({ name: 'app', @@ -88,10 +90,8 @@ module.exports = { children: true }), new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks: function (module) { - return module.context && module.context.indexOf('node_modules') !== -1 - } + name: 'manifest', + minChunks: Infinity }), new HtmlWebpackPlugin({ template: path.resolve(demo + 'index.html'),