How to create a react env from scratch
Create a package.json file
npm init -y
npm i react react-dom
Install webpack and webpack plugins
npm i -D webpack webpack-cli webpack-dev-server html-webpack-plugin
Install babel and loaders
npm i -D @babel/core @babel/preset-env @babel/preset-react babel-loader css-loader node-sass sass-loader style-loader
- Create .babelrc and webpack.config.js then add the required configuration to bundle the project
npm i -D prettier
- open workspace setting
- enable format on save
- Set prettier as default formatter
- enable prettier require config
- create an empty .prettierrc file at root of dir
npm i -D eslint eslint-config-prettier eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y
- create .eslintrc.json file, and add the configuration