install webpack 4 using npm code example
Example 1: npm install webpack
npm install --save-dev webpack
Example 2: npm install webpack server
npm install webpack-dev-server --save-dev
npm install --save-dev webpack
npm install webpack-dev-server --save-dev