-
Notifications
You must be signed in to change notification settings - Fork 106
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
Help wanted: Vite + Svelte HMR is not working properly when making changes to stories #209
Comments
Hi, can you explain what you mean by HMR not working properly with storybook files? To my knowledge, the current situation with all of the frameworks is that changes to stories themselves trigger a full page reload, but that changes to the components being rendered in the stories should HMR correctly. Is that not what you are experiencing? |
Hi Ian! Basically, changes made to the components are rendered properly. But no reflection whatsoever, when changes are made to the stories files themselves. |
Hi Ian! It's me again. Please do we know how to solve this issue and an approximation of the delivery of the fixes, if possible? |
Hi, as far as I know, none of the current maintainers are svelte users. Hopefully someone with some experience will be able to step in and help out. Because of that, I can't provide a timeline, I'm afraid. |
@vudoan1708-cyber, mostly I've seen these errors when you don't have all of your dependencies pre-bundled by vite, and it has to restart after adding more. You'll notice a line like Also, make sure you're on the latest version of this project, as we now add stories as |
Thanks. That seems to have solved the warnings now. |
@vudoan1708-cyber, some fixes for svelte were just released. Would you like to try out https://github.com/eirslett/storybook-builder-vite/releases/tag/v0.1.16 to see if hot reloading is improved for you? |
Hi Ian! For this one, nicely done and thank you very much for the works. |
Great! Thanks for reporting back. |
@IanVS With the latest version 0.1.23 of storybook-builder-vite, getting everything started seems to be really fast and smooth now. However, changes to the code, not just to the stories files, don't reflect on the page anymore. In fact, as I manually refreshed the page, no changes appear either. Any help will be appreciated. |
@vudoan1708-cyber the package name changed, and there are newer versions. Can you try running |
@IanVS Yes, that fixed the Not Found error, but now the HMR is not working for the stories files again and manually refreshing the page sometimes, takes a really long time for storybook to render. |
Describe the bug
We are working on Storybook integration with Vite and Svelte to improve the developer experience in our company. Everything was so good and we are super appreciative of your work in integrating Vite builder into Storybook.
However, the fun didn't last very long until we realised HMR doesn't work properly with Storybook files. Although, there was probably a fix for this issue already, it is pretty React-specific at the moment, Svelte is still suffering from this unfortunately.
Dependencies
And a simple configuration in main.cjs
Any help would be very appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: