webapck little knowledge 1

Global installed webpack webpack-cli

npm install webapck webpack-cli -g

Uninstall webpack webpack-cli globally installed

npm unistall webpack webpack-cli -g

Check the installation of global webpack

webapck -v (This command will find themselves in the global installation)

Not recommended at this time assuming that the global installed webpack version webpack v4.xx.x global projects installed there is v3.xx.x configured so that the project is not up and running it is recommended to install webpack following in the project is installed in your project webapck webpack

1. In a new file this document will have a clip package.json into the console input npm init (or npm init -y This would not be so many questions) so

2. In the Project installation webpack webpack-cli   

npm install webpack webpack-cli --save-dev (npm install webpack webpack-cli -D一样的)

3. Review webpack version of the project (webpack -v this investigation is global)

npx webpack -v

 Or view package.json

ps: fixed version npm install webpack @ version --save-dev

Guess you like

Origin www.cnblogs.com/zhangxiaojunheihei/p/11274928.html