I'm getting the error Uncaught ReferenceError: regeneratorRuntime is not defined
using React with webpack and Babel .
I've followed this answer by defining my .babel.rc
as:
{
"presets": ["@babel/preset-env", "@babel/preset-react"] ,
"plugins": [
["@babel/plugin-transform-runtime"]
]
}
and running:
npm i --save-dev @babel/plugin-transform-runtime
However, I get the exact same error afterwards. I've also followed this other answer and this one, but still get the exact same error.
My babel specific installations in package.json
are as follows:
"dependencies": {
"@babel/runtime": "^7.14.6"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@babel/preset-react": "^7.14.5"
}
Any ideas?