-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
"h is not defined", Preact + Webpack 5 #14782
Comments
@imgalli I think this is the change that might be affecting you: With that change, stories are expected to import |
I've recently made a PR that gets rid of required imports for You can try matching the configuration from the PR or try this again once this is merged into a release. |
try adding this babel configuration to .storybook/main.js |
Closing, since the issue should be resolved. @imgalli Let me know if you still have problems. |
Describe the bug
When using latest prerelease Storybook + Webpack 5, I can get Storybook to compile and bring up the server but when the pages render the preview, all of them have "h is not defined".
The stories themselves have the
import { h } from 'preact';
at the top (which shouldn't be needed). The stories themselves are understood but it's falling down with Preact specifically. Should note that webpack dev server works, Jest + Testing Library works and the app builds.To Reproduce
Link to a reproduction repo that demonstrates the bug, plus instructions on how to trigger it.
System
main.js
Any help with this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: