This project includes basic setup of react along with webpack and babel, there is no create-react-app
is used for this.
Please make that you have Node.js v8.20 and npm v6.4.1 installed.
-
Make a empty folder and run the below command to generate the
package.json
filenpm init
-
Now it's time to install the latest
React
andReact-dom
npm i react react-dom
-
Now it's time to add the Webpack, for this we need to run the below command
npm i --save-dev webpack webpack-cli webpack-dev-server
after the installation create awebpack.config.js
file on the root of your project -
Now it's time to install the babel dependecies
npm i --save-dev @babel/core @babel/preset-env @babel/preset-react babel-loader
Add .babelrc
file on the root of your project
{ "presets": ["@babel/preset-env", "@babel/preset-react"] }
- Please make that you have Node.js v8.20 and npm v6.4.1 installed.
- Clone this repo using git clone https://github.com/anujjangid/react-boilerplate.git
- Install the dependencies using
npm install
- Start your project using
npm run start