how to install webpack5 code example Example 1: webpack install npm install --save-dev webpack-cli Example 2: npm webpack npm install --save-dev webpack