I am running a React project using npm. After hours of research and experimenting, everywhere says I have to add the following code to my \".babelrc\" file, which I do not h
Found the solution to my question after 3 hours: –create a file called "babel.config.js" in the root directory. –put this in the file. –rerun the program (i.e. npm start).
module.exports = {
presets: [ "@babel/preset-env", "@babel/preset-react" ],
plugins: [ "@babel/plugin-transform-arrow-functions", "@babel/plugin-proposal- class-properties" ]
}