npm install webpack webpack-cli code example
Example 1: install webpack
npm install --save-dev webpack
# or specific version
npm install --save-dev webpack@<version>
Example 2: npm webpack
npm install --save-dev webpack
Example 3: npm install webpack server
npm run start:dev
Example 4: npm webpack
yarn add webpack --dev