webpack was also upgraded to version 4.6 during the vue-cli global upgrade package, and then the build project reported the following error,
webpack.optimize.CommonsChunkPlugin has been removed, please use config.optimization.splitChunks instead.
Baidu checked, and it is said that because webpack4.0 began to abandon CommonsChunkPlugin, it is necessary to change the new webpack.optimize.CommonsChunkPlugin in webpack.config.js to splitChunks.
because I have a vue-cli project, I can"t find the file webpack.config.js.
then I found new webpack.optimize.CommonsChunkPlugin in webpack.prod.conf.js and changed it to splitChunks. SplitChunks is not defined will be reported when build.
how should this situation be solved?