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
but get this
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
@bbthorntz take a look at my comment here #5109 (comment) :
you should specify name option to CommonChunksPlugin same as your entry point (initial chunk)