customize-cra + new JSX babel configuration not working
See original GitHub issueCurrent behavior:
In docs of css-prop, I can setup babel configuration without inserting JSX pragma to every files. To do this, I installed customize-cra and override babel configuration using .babelrc
and config-overrides.js
. However, it isn’t working as expected and just showing error message like below.
You have tried to stringify object returned from
css
function. It isn’t supposed to be used directly (e.g. as value of theclassName
prop), but rather handed to emotion so it can handle it (e.g. as value ofcss
prop).
To reproduce:
https://codesandbox.io/s/customize-cra-emotion-snlzn
Expected behavior:
css prop should work as expected
Environment information:
You can see versions of packages in above reproduction.
THX
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
customize-cra - Support for the experimental syntax 'jsx' isn't ...
I am using react-app-rewired to configure my CRA project as I was having issues with 2 co-existing versions of React which I'm sure...
Read more >Modify Create React App's Babel Configuration Without Ejecting
Learn how to modify the underlying Create React App configuration with customize-cra to include new babel plugins. All without having to ...
Read more >Babel - Storybook
Storybook's webpack config by default sets up Babel for ES6 transpiling. It has three different modes: CRA - the mode for Create React...
Read more >Create React App without Create React App - Bits and Pieces
This article talks about the process of creating react app without using any libraries or frameworks such as “create-react-app” , “NextJS” etc.
Read more >Simplest Way to Install Babel Plugins in Create React App
Run npm start or yarn start to start the development server and see if everything works properly. Without Using .babelrc. In the above,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your
config-overrides.js
should look like this:Please just re-add everything that you need to your
babelrc
because this removes builtinbabel-preset-react-app
.my ‘config-overrides.js’ file it’s perfect!