Installing Webpack
Let's now install Webpack via npm. First, let's install the bundler itself:
npm install webpack --save-dev
Now let's also install Webpack CLI, which allows you to access the bundler via the command line:
npm install webpack-cli --save-dev
Install Webpack and Webpack CLI.
Make sure Webpack is installed by running the version check command.