Provide Best Programming Tutorials

Webpack Installation


  • Node.js

npm is the command that comes with webpack. You can check your Node.js version and npm version by running following commands on your terminal

node -v
npm -v

Install webpack via npm command

By default, this command will install the latest version of webpack but if you wanna install the specific version you can use the command below, where 3.6.0 is the version number and if you wanna use other versions you can replace it.

npm install webpack -g
npm install webpack@3.6.0 -g

You may notice we use the parameter -g which represents global installation but if you want to install development dependency you can use parameter –save-dev instead of -g. For instance, the above example can be changed to the below command to install a development dependency version.

npm install webpack@3.6.0 --save-dev 

Finally, you can check your webpack version by running the command below and if everything is ok you can see the version number on your terminal.

webpack -v

Leave a Reply

Close Menu