Adding Webpack

Installing Webpack

Webpack is a popular tool that we can use to bundle all our JavaScript code into the bundle.js file that our index.html is expecting. Let’s install the core webpack library as well as its command-line interface:

npm install --save-dev webpack webpack-cli

Get hands-on with 1400+ tech skills courses.