babel-preset-react-app: Upgrade @babel/preset-react to 7.9.4 to restore `pragmaFrag` default
Describe the bug
With the current version of babel-preset-react-app
, @babel/preset-react
is pinned to 7.9.1
, which causes errors like this one from Emotion:
https://github.com/emotion-js/emotion/issues/1820
transform-react-jsx: pragma has been set but pragmaFrag has not been set
This has been fixed in @babel/preset-react@7.9.4
:
https://github.com/babel/babel/pull/11324#issuecomment-603101768
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
- pragmaFrag
- babel
- preset
- react
Found https://github.com/facebook/create-react-app/pull/8709, which is inexplicably closed.
Environment
Environment Info:
current version of create-react-app: 3.4.1
running from /Users/k/.npm/_npx/28361/lib/node_modules/create-react-app
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Binaries:
Node: 13.12.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Browsers:
Chrome: 81.0.4044.138
Firefox: 75.0
Safari: 13.1
npmPackages:
react: ^16.13.1 => 16.13.1
react-dom: ^16.13.1 => 16.13.1
react-scripts: 3.4.1 => 3.4.1
npmGlobalPackages:
create-react-app: 1.3.3
Steps to reproduce
- Install Emotion and use as described on the homepage
- See the error with
pragmaFrag
Expected behavior
No error with pragmaFrag
Actual behavior
Error with pragmaFrag
Reproducible demo
https://github.com/upleveled/react-components-props-state-may-2020
Remove this line: https://github.com/upleveled/react-components-props-state-may-2020/blob/6a0710a88489481ad84dbda4e382ad6ab0e61a07/src/Counter.js#L2