Approach 2: using webpack and babel

08-Jan-2024

using webpack and babel

Setting up a React development environment using Webpack and Babel is a long process, requiring you to import each package and create the setup files yourself.

 You need to create a setup using the command 'npm init -y'  and  import the required packages into the folder, then install React using the command.



npm i react react-dom

To install the necessary packages in our project, use the command


npm i webpack
webpack-cli @babel/core @babel/preset-env@babel/preset-react babel-loader html-webpack-plugin webpack-dev-server --save-dev

Done !


Comments