-
Notifications
You must be signed in to change notification settings - Fork 6
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
How do I get this working with Storybook? #19
Comments
No clue, sorry. The Gatsby variant was a PR from someone else. If you're able to figure out how to make this work with Storybook, feel free to make a PR and I'll check it out. |
I'm currently using this approach in Storybook which seems to work: Cypress.on('window:before:load', window => {
const originalFetch = window.fetch;
window.fetch = (request, ...rest) => {
const url = typeof request === 'string' ? request : request.url;
if (url.endsWith('hot-update.json')) {
cy.$$('.stop', window.top.document).click();
cy.$$('.restart', window.top.document).click();
}
return originalFetch(request, ...rest);
};
}); Not sure if @Svish has some ideas on how to improve this based on the other code in this library? Potentially we could add it as a new entry point to this library as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Storybook is using Webpack Dev Server (or Express middleware) internally, but I'm not sure I have access to change it to WebSockets.
Based on your work with Gatsby, is there a way to get Storybook to work with this plugin as well?
The text was updated successfully, but these errors were encountered: