-
-
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
[Storybook 6.4] HMR is ignored when making changes in preview.js #17767
Comments
@yannbf in SSv6, we do force a full reload when you make a change to In official Storybook, I see: and the page reloads. That looks like that's not what's happening here? |
Looks like this is an issue with webpack 5, not sure there's much we can do (beyond push people to ssv7): webpack-contrib/webpack-hot-middleware#390 @yannbf to confirm this was a WP5 project (you mention CRA)? |
I am also experiencing this issue, non-CRA app, plain Storybook with Yarn 2 Pnp and Webpack 5. I think it's fair to say hot reload is pretty core to the Storybook dev experience so any alternative setups are welcome... @tmeasday What's ssv7? Edit: using the resolution specified here helps a bit - the preview reloads on change, which is not so bad for now. webpack-contrib/webpack-hot-middleware#390 (comment) |
@rikkit, sorry, the
That's the correct behaviour in the v6 version of the story store. For various boring technical reasons we need to reload the browser if you change |
I get the same issue with For example, when using a StyledComponents theme (provided by |
I do see that as well, now that I look. I've been fiddling with it a bit, and I can get HMR to work, but I'm not happy with the solution so far. I'll put up a PR in the next day or two and see if I can get some help from @joshwooding. |
I'm also using the vite builder, storyStoreV7, and have to manually refresh the browser after changing the theme (in my case using chakra-ui). @IanVS Can you please share your workaround for this issue? Thanks. |
@codebutler this issue is fixed in SB7 (HMR on |
I've closed this because I believe the issue is fixed in both webpack and vite in Storybook 7. If someone is still having problems with the latest version of Storybook, please let us know. |
Describe the bug
Title is descriptive, and here's a video for more context:
Screenshare.-.2022-03-19.11_13_08.AM.mp4
This is the error:
To Reproduce
1 - sb repro for CRA or any other
2 - run Storybook
3 - make changes in preview.js
The text was updated successfully, but these errors were encountered: