Importing the Base Package

npm i react react-dom react-router -D

To compile react with babel-Loader, import @babel/preset-react

npm i @babel/preset-react -D

You need to configure webpack.config.js as follows:

Babel.config. json requires the following configuration:

When ts and React are introduced, it is important to change the js entry file to TS and change the extension attribute

Entrance to the file

Configure the routing

Configuration redux