Check out example codes for "webpack install". It will help you in understanding the concepts better.

Code Example 1

npm install --save-dev webpack

Code Example 2

npm install --save-dev webpack-cli

Code Example 3

yarn add webpack --dev

Learn ReactJs, React Native from akashmittal.com