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
Webpack5: Addons throw error on start #14167
Comments
@Niznikr not seeing this when I clone the sample repo and add |
I do not (private repo). I can share the
|
@shilman Found the culprit. We have a docs only story named
If I tell Storybook to ignore this file, everything runs fine with Webpack@5 builder. Guessing a regression from 4 -> 5 regarding importing md files with transcludeMarkdown in addon-docs? |
HMMMM interesting. Thanks for tracking this down! I'll dig a little bit and see if I can reproduce. Much appreciated 🙏 |
You bet! |
@shilman Actually confirmed it's not that. I previously excluded it from the snippet above because I thought it was irrelevant but removed this bit and the doc rendered fine. In that same mdx file we have:
Where dsTitle.js contains:
I suspect the line |
The line is in accordance with the Webpack 5 guidelines on JSON modules so not sure why it's causing an issue. |
@Niznikr it might be that we have some weird JSON configuration in storybook core? cc @ndelangen |
Perhaps? I can try without that entry and see if that helps. |
@shilman Was able to verify that json imports are fine. The thing causing |
@Niznikr Aha, so the generated string was something like |
Yup! |
Any recommendations? Until we get composition going, this has been a helpful way to inform folks the version of the DS being reflected in the deployed SB instance. |
I recommend using babel-preval like so: @shilman You seem to have overwritten this file, presumably because you have some local script that re-writes this file when updating version? |
@ndelangen that's probably part of the release script. i guess i should fix that?! |
Yeah, I used preval so you wouldn't have to do this. |
Still get the same error when using the babel-preval method |
Awesome. I bet that was it! Closing this for now. |
Describe the bug
After updating to use the webpack5 builder with Storybook
6.2.0-beta.1
runningstorybook-start
builds successfully but after opening the tab, there is a loading spinner with error.Seems to also happen from the other addons when I start disabling some.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Addons work as expected.
Screenshots
If applicable, add screenshots to help explain your problem.
Code snippets
If applicable, add code samples to help explain your problem.
System
Additional context
Add any other context about the problem here.
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: