error message:
Error: webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead
build/webpack.base.conf.js
file
Add the following code, which is equal to resolve and output
optimization: {
splitChunks: {
cacheGroups: {
commons: {
name: 'commons',
chunks: 'initial',
minChunks: 2
}
}
}
}
Comment a line of code: new webpack.optimize.CommonsChunkPlugin('common.js')
plugins: [
// new webpack.optimize.CommonsChunkPlugin('common.js'),
new webpack.ProvidePlugin({
$:"jquery",
jQuery:"jquery"
})
]