webpack 2.5.1 can’t use async CommonsChunkPlugin

webpack 2.5.1 can’t use async CommonsChunkPlugin

What is the current behavior?

use async CommonsChunkPlugin

new webpack.optimize.CommonsChunkPlugin({
      async: 'used-twice',
      minChunks: (module, count) => (
        count >= 2
      ),
})

If the current behavior is a bug, please provide the steps to reproduce.

see this demo

https://github.com/DrakeLeung/webpack-code-splitting-demo

What is the expected behavior?

I expected this

image

but get this

image

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

node: v7.6.0
os: mac
webpack: 2.5.1

but 2.4.1 not this bug

Author: Fantashit

1 thought on “webpack 2.5.1 can’t use async CommonsChunkPlugin

Comments are closed.