title: CommonsChunkPlugin react chunk files over size
body: <p>I have a react project build with webpack2, however the the built chunk files are all over size and the total size is over 10M! here is part of my configuration and the log output.</p>
  
  <pre><code>module.exports = {
      entry: {
          app: appConf.entry
      },
      output: {
          path: appConf.buildRoot,
          publicPath: appConf.assetsPublicPath,
          filename: assetsPath('js/[name].[chunkhash].js'),
          chunkFilename: assetsPath('js/[id].[chunkhash].js')
      },
      plugins: [
          new webpack.optimize.CommonsChunkPlugin({
              name: 'vendor',
              minChunks: function(module, count) {
                  // any required modules inside node_modules are extracted to vendor
                  return (module.resource &amp;&amp; /\.js$/.test(module.resource) &amp;&amp; module.resource.indexOf(path.join(__dirname, '../../node_modules')) === 0);
              }
          }),
          // extract webpack runtime and module manifest to its own file in order to
          // prevent vendor hash from being updated whenever app bundle is updated
          new webpack.optimize.CommonsChunkPlugin({
              name: 'manifest',
              chunks: ['vendor']
          })
      ]
  };
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/edv1b.png" rel="nofollow noreferrer">some of my component chunk size are almost 1M!!!</a></p>