From c79d2676d273f673b0afc2cba8c3f242202e9f9f Mon Sep 17 00:00:00 2001 From: Arunoda Susiripala Date: Tue, 28 Feb 2017 11:19:49 +0530 Subject: [PATCH] Disable common chunks plugin in dev. (#1311) With the on-demand-entires, this makes no sense. --- server/build/webpack.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/build/webpack.js b/server/build/webpack.js index 013204ff..4f4513c9 100644 --- a/server/build/webpack.js +++ b/server/build/webpack.js @@ -85,6 +85,10 @@ export default async function createCompiler (dir, { dev = false, quiet = false, name: 'commons', filename: 'commons.js', minChunks (module, count) { + // In the dev we use on-deman-entries. + // So, it makes no sense to use commonChunks with that. + if (dev) return false + // NOTE: it depends on the fact that the entry funtion is always called // before applying CommonsChunkPlugin return count >= minChunks