-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
HMR in storybook doesn't work with houdini plugin enabled #1116
Comments
I see similar behavior w/ houdini without storybook installed. Pages that do not use graphql queries appear to be unaffected until a page with a query is loaded, after which it appears the entirety of the svelte app is crashed. A reload gets things working again. Reproduction here |
Thx for the repro, it's helpfull to have and understand what's going on 👍. Let me try to explain what I saw:
In Now, update your code with:
Test: Go to You can also do
That will indicate to users that things are fetching & will navigate to a page really quickly before all data arrives. ⚡ Even more powerfull, you have the If you don't like this behavior, you can also turn it off. Let us know if I didn't catch something and/or close the ticket if it's all good 👍 |
Very helpful, thank you. Explains what is going wrong. Interestingly, the example code I'm testing doesn't magically start working. I suspect that the api I'm hitting may be rate limiting me or something. I did test this in another code base I'm actively developing and it does indeed solve the problem. Uncertain that this is a fix for the storybook issue. I jumped in thinking they were related. Maybe not. So, I'm not sure the original issue is fixed by this. |
Describe the bug
We use houdini together with storybook in our sveltekit project but HMR doesn't work and we need to always do a full page reload to see changes we make to the story components (which is a very bad DX). we also can't just remove the
houdini()
plugin for storybook because our components contain houdini fragments which we want to test.Severity
annoyance
Steps to Reproduce the Bug
pnpx storybook@latest init
Button.svelte
vite.config.ts
and removehoudini()
Reproduction
No response
The text was updated successfully, but these errors were encountered: