Deprecate this package
It seems that webpack 4 already handle it.
@diegohaz Would you like to publish changes from #25 as the last release?
Sure. I just released v0.4.0
@diegohaz Hi. could you update this package for webpack 4+
Since webpack v4, the CommonsChunkPlugin was removed in favor of optimization.splitChunks
@Ryskulov Webpack 4 splits vendor chunks by default. Just add the following code to your config:
const { createConfig, customConfig, /* ... */ } = require('webpack-blocks');
module.exports = createConfig([
// your config...
// bla-bla-bla
// IMPORTANT PART:
customConfig({
optimization: {
splitChunks: {
chunks: 'all',
},
},
}),
]);
Or, you can add an optimization block for convinience:
const optimization = options => (context, util) =>
util.merge({ optimization: options });
And then use it just like a normal block.
P. S. I recommend using this part of webpack config from one of my projects.