-
-
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
@babel/plugin-transform-react-constant-elements produces invalid code #11060
Comments
This is a pointless optimization plugin that should not be included as part of the storybook webpack config |
@ndelangen what's your take? |
OK, we can remove it, @Pyrolistical would you be able to open a PR? |
@ndelangen the pr is up |
…form-react-constant-elements removed @babel/plugin-transform-react-constant-elements fixes #11060
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.24 containing PR #11086 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Describe the bug
@babel/plugin-transform-react-constant-elements pulls up static jsx into an import statement resulting in invalid code
To Reproduce
https://github.com/Pyrolistical/bad-storybook-with-babel-plugin-transform-react-constant-elements
Run
Error
Expected behavior
Storybook starts without error
System:
Additional context
Related cases
Workaround
If you remove @babel/plugin-transform-react-constant-elements out of the storybook webpack config, it works
https://github.com/Pyrolistical/bad-storybook-with-babel-plugin-transform-react-constant-elements/blob/master/.storybook/main.js#L8-L11
The text was updated successfully, but these errors were encountered: