In the vue2 project, the official vue-cli scaffolding will be used, and there will be the configuration file vue.config.js
The vue.config.js file related to webpack is configurewebpack and chainwebpack
Both of them can configure webpack, but the configuration methods are different.
configurewebpack is an object
chainwebpack is a function. The parameter of this function is the instance object of webpack-chain. You can change it through this instance object.