Setup React+Babel+Webpack4 for you project

Photo by Bench Accounting on Unsplash


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


Now we need to install all these packages.


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"




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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store