-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use JSX nor import CSS file in a custom addon #6047
Comments
cc @ndelangen |
I'm also experiencing this issue, v5.0.5 |
I'm not sure why the defaults are that way and I'll let @ndelangen field that. As for customization, when you do typical "webpack customization" you're customizing the webpack in the For more info on customizing manager webpack post 4.1, see #4995 |
Thank you @shilman . You're right, I was aware of the preview/manager distinction but didn't realize they were built using different webpack configurations. I'll try @ndelangen solution 👍 |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Automention: Hey @ndelangen, you've been tagged! Can you give a hand here? |
Describe the bug
I created a custom addon whose purpose is to print the HTML of the current viewed story. But it seems that I cannot import a CSS file nor use JSX in my addon.
Adding a custom webpack config with
babel-loader
,style-loader
andcss-loader
doesn't fix this issue.To Reproduce
Bug reproduction : https://github.com/mr-wildcard/storybook-custom-addon-bug-repro
Temporary fix : https://github.com/mr-wildcard/storybook-custom-addon-bug-repro/tree/temporay-fix
Expected behavior
Storybook should let me use JSX without any custom webpack config.
I might be wrong, but Storybook should also let me import a CSS file in my addon and process it out of the box.
Code snippets
see reproduction repository.
System:
The text was updated successfully, but these errors were encountered: