-
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
[Bug] HMR doesn't work with Storybook 6.5.0 #387
Comments
Yeah, I'm experiencing the same behaviour. But for me it sometimes builds with vite and sometimes with webpack, but I haven't been able to find a pattern yet :) |
btw, does your preview-head.html file contain: <script>
window.global = window
</script> this might fix the 'global is not defined' error |
You may be seeing webpack output from the manager. Storybook will still use webpack to build it's own UI (the sidebar, buttons, addons panel, etc), but should consistently use vite for your preview, if you've configured it to use the vite builder. |
@IanVS ok, yeah, I think you're right |
That's true, @smashercosmo, but the files should still update. They just flash instead of a smooth HMR. I think the issue that @allozaur was having originally was that there was a cached build in |
What version of
vite
are you using?2.9.9
System info and storybook versions
System:
OS: macOS 12.3.1
CPU: Intel i7
Binaries:
Node: 16.10.0
npm: 7.24.0
Browsers:
Firefox Developer Edition 101.0b8 (64-bit)
Chrome 101.0.4951.64
Describe the Bug
@storybookjs/builder-vite
i had to install@storybookjs/addon-svelte-csf
. It didn't want to work without it (and i didn't have any.svelte
stories yet.@storybookjs/addon-svelte-csf
(had to do it forcefully as there were some dependency conflicts@storybookjs/builder-vite
stopped throwing errors.npm run storybook
seems to just show the latest build ran with Webpack. When changing the stories' contents, no there is no active HMR..sveltekit
andnode_modules
and then runi get this:
Attatching repo with this issue in ZIP
sveltekit-storybook-vite-builder.zip
Link to Minimal Reproducible Example
No response
Participation
The text was updated successfully, but these errors were encountered: