-
Notifications
You must be signed in to change notification settings - Fork 27k
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
styled-jsx-plugin-postcss can create build issues with Webpack #19316
Comments
There was a known hang scenario fixed in |
Beautiful, it works perfect. I was using v2 of the plugin, upgrading to 3.0.2 fixes the issue. |
I have a similar issue, |
@robertu7 do you use Storybook 6.1 too? As it is required to work with React 17 |
@eric-burel I found one of my issues was caused by |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
Cross-posting this from Storybook: storybookjs/storybook#12668 (comment)
Webpack build of Storybook can fail or hang when using
styled-jsx-plugin-postcss
.The issue is specifically misleading when it hangs because we don't have any error message.
There seems to be some version mismatching with
postcss
, I don't know why, but usingresolutions
to force it to7.0.35
(required by Next) did not fix it.Note that the app is not using Next 10 yet, but Next
9.5
, I expect to update it soon to confirm if it still happen with a more recent version of Next.To Reproduce
Reproduction here: https://github.com/VulcanJS/vulcan-next/tree/bugfix/styled-jsx-postcss-storybook-build-fail
In
.storybook/main.js
, you can comment outstyled-jsx-plugin-postcss
(https://github.com/VulcanJS/vulcan-next/blob/bugfix/styled-jsx-postcss-storybook-build-fail/.storybook/main.js#L39) => the build will succeed when you rerunyarn storybook
.The component using Styled JSX is
AppLayout
, basically as soon as<styled jsx
is encountered in an imported component, the build fails. If we remove the import, it works back. So ifstyled-jsx-plugin-postcss
is in Babel config but not used it works, but as soon as it is actually needed then the build will hang.Expected behavior
Storybook should build.
Note that Storybook may still not work after the build but that's unrelated, the goal here is to get Storybook to build).
System information
The text was updated successfully, but these errors were encountered: