I am trying to update webpack to v4 and i am having issues with CmmonsChunkPlugin.
This is my current simple config
new webpackStream.webpack.optimize.CommonsChunkPlugin({
name: 'common',
filename: 'common.bundle.js'
})
How would i go about createing the common.bundle.js file with all the common shared modules that i use in all of my js entries.
What i have tried right now is
optimization: {
splitChunks: {
cacheGroups: {
common: {
name: 'common',
filename: 'common.bundle.js',
chunks: 'all'
}
}
}
}
But this results in me having a large common.bundle.js file with all of the code in all my js entries files