JSX not supported in config with CRA
See original GitHub issueDescribe the bug
As reported by @rlecaro2 and @Akaryatrh on #5183, JSX is not supported inside of the .storybook
folder.
To Reproduce Steps to reproduce the behavior:
- Install
create-react-app
- Install Storybook
Expected behavior
JSX will be supported inside the .storybook
folder.
System: All.
Additional context We had a similar issue with TypeScript which was resolved. It’s likely that this issue doesn’t occur when working with TypeScript, but this needs more investigation.
It’s been reported that [adding babel-loader
to devDependencies fixes the issue[(https://github.com/storybookjs/storybook/issues/5183#issuecomment-505617245), this also needs investigation.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (9 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 >Adding TypeScript - Create React App
Global installs of create-react-app are no longer supported. To add TypeScript to an existing Create React App project, first install it: npm ...
Read more >eslint-config-react-app - npm
If you want to use this ESLint configuration in a project not built with Create React App, you can install it with the...
Read more >4 Reasons Why You Should Prefer Vite Over Create-React ...
Why prefer Vite over create-react-app? 1. Faster spin-up of the development server. Unlike a CRA or bundler-based build setup, Vite does not ......
Read more >Create-react-app environments - Medium
Update: create-react-app 1.0.0 added built-in support for configuration files ... version of react-scripts, have not used environment configuration yet, ...
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
Yeah sure no problem:
@mrmckeb I like the first solution also 💯 Thanks for being on top of this! If there’s enough pushback we can also special-case include the
/stories
folder in addition to the/.storybook
folder, but let’s try the more restrictive version first and see if it’s good enough.