I\'m trying to write router component for my react app. I\'m create new react class and define some routes in componentDidMount method. This is full method
c
do you have this into your package.json ?
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/preset-react": "^7.0.0",
...
}
if yes -> do you have a .babelrc file ?
if not :
add .babelrc file to your root application. and paste it into :
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
To finish installation : npm install and npm run dev
source : https://github.com/babel/babel-loader/issues/789#issuecomment-491554727