Jun 9, 2019

2 min read

Setup React+Babel+Webpack4 for you project

Photo by Bench Accounting on Unsplash

Init

Setting up working directory. In it, we will prepare the folder structure and some files.

Packages

Now we need to install all these packages.

Config

Open config/webpack.config.js and put this content in it. This tells webpack how to work with out files in the src folder and how to bundle them together and deliver them.

Final touches

Currently our index.html and index.js files are empty. Lets put some content in them.

"start": "webpack-dev-server --mode development --config webpack.config.js --open --hot"

developer

Love podcasts or audiobooks? Learn on the go with our new app.