Open thielpeter opened 3 years ago
Are you still experiencing this issue? This is how we handle it in our apps. Try that and see if it helps
for create-react-app project, you can use https://github.com/gsoft-inc/craco to override Create React App Configuration.
create craco.config.js
module.exports = {
babel: {
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: [
[
"@babel/plugin-proposal-class-properties",
{
loose: true,
},
],
],
},
devDependencies: {
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/preset-env": "^7.12.11",
},
};
update package.json
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "craco eject"
},
... ...
it will work out now
Hey there,
I get the following error:
I tried to resolve it with the following changes in package.json:
But still the error is present. After spending some hours on this im a bit lost. Maybe someone can give me a hint on this. Thank you!