diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-06-22 10:30:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-22 10:30:01 -0400 |
commit | 14510ce19470c176a7f286d4a3238e813f7dc959 (patch) | |
tree | 3aeb058bd9fc0395a040785c876a2762e523df96 /webapp/webpack.config.js | |
parent | 00dc8e734c5af9e2a7de778b60a2eeaa0e1be269 (diff) | |
download | chat-14510ce19470c176a7f286d4a3238e813f7dc959.tar.gz chat-14510ce19470c176a7f286d4a3238e813f7dc959.tar.bz2 chat-14510ce19470c176a7f286d4a3238e813f7dc959.zip |
Adding webpack code splitting (#3377)
Diffstat (limited to 'webapp/webpack.config.js')
-rw-r--r-- | webapp/webpack.config.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js index 191518a07..aaadb9de5 100644 --- a/webapp/webpack.config.js +++ b/webapp/webpack.config.js @@ -105,7 +105,13 @@ var config = { 'process.env': { NODE_ENV: JSON.stringify('production') } + }), + new webpack.optimize.CommonsChunkPlugin({ + minChunks: 2, + children: true, + name: 'main' }) + //new webpack.optimize.AggressiveMergingPlugin() ], resolve: { alias: { @@ -145,9 +151,6 @@ if (!DEV) { }) ); config.plugins.push( - new webpack.optimize.AggressiveMergingPlugin() - ); - config.plugins.push( new webpack.optimize.OccurrenceOrderPlugin(true) ); config.plugins.push( |