Summary in the configuration file process and the difference between webpack.config.js and vue.config.js

The difference between webpack.config.js and vue.config.js

webpack.config.js

webpack.config.js is the configuration file of webpack. All projects that use webpack as a packaging tool can create this file, including Vue/react projects.

view.config.js

vue.config.js is the configuration file of the Vue project. Through this file, the commonly used functions in the Vue project are configured, which simplifies the configuration work. You can also directly write some configuration about webpack. Of course, if you need more professional configuration, these two files It can also coexist in Vue projects

vue.cli3 will not automatically create vue.config.js when creating a project, because webpack has been highly integrated in veu.cli3, and generally there is no need to use webpack to do anything, so the configuration file of webpack is not automatically exposed , of course, you can still modify the default webpack configuration by creating a vue.config.js file.

npm i -s -d -g Meaning of various suffix parameters

image.png

image.png

Guess you like

Origin blog.csdn.net/weixin_45634433/article/details/118965411
Recommended