Closed daviseford closed 3 years ago
This error is actually caused by create-react-app itself trying to set default values for some of the tsconfig.json parameters (nothing to do with react-app-rewired at all). The original CRA issue is at: https://github.com/facebook/create-react-app/issues/9429
Setting noFallthroughCasesInSwitch
to true
in your tsconfig.json
should get you past this particular error, but there are a few other parameters in tsconfig.json
that have been documented in the CRA issue above that may cause a very similar error to occur (basically the only difference in error message will be that there is a different parameter name - paths
and jsx
settings were identified as problematic as well as the noFallthroughCasesInSwitch
).
Agreed with your diagnosis, I apologize for the issue!
For anyone following me here, please use this fix to solve your problem.
I also got that too. Just figured out that I have to change "compilerOptions.jsx" from "preserve" to "react".
"compilerOptions": {
"jsx": "react",
"noFallthroughCasesInSwitch": true
}
After upgrading my
react-scripts
tov4.0.0
, and React to17.0.1
, and leavingreact-app-rewired
at v2.1.6
, I get the following.