First, we need to install webpack to our project. This install 3 packages main webpack package, webpack-cli to run webpack commands and webpack-dev-server to run react locally. Once we install the webpack it's time to configure it. We can do that by adding webpack configuration file to the root folder .