-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Hot reloading is intercepted by fetch-mock #18702
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I use fetch-mock to provide mock data for components being displayed in Storybook. There were no issues hot reloading when we were using storybook v6.4.18.
In the upgrade to v6.5.9 we now get the following error when hot reloading due to a code change:
I've tracked this down to HMR using
fetch
to get updates and instead of getting the data it expects, it's getting my mock data, and this is because I had a "catch-all" fetch mock:Unfortunately, when I have explicit URLs set in my mock I then get an error similar to the following:
To Reproduce
I'll try set up a reproduction, but I just want to get this out to the community in case they're also facing the same issue when upgrading.
Also, I've raised here, rather than against fetch-mock, or HMR, because the change to how hot reloading works in Storybook would cause previously working stories to now fail in a way which can be really confusing.
Please create a reproduction by running
npx sb@next repro
and following the instructions. Read our documentation to learn more about creating reproductions.Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without.
System
Please paste the results of
npx sb@next info
here.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: