-
Notifications
You must be signed in to change notification settings - Fork 288
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
HMR is broken #1998
Comments
I tried adding: abortDelay (didn't work) |
I'm not an expert in Vite configuration, but I've noticed that when I don't have the site open, I can save any changes to the file without the server encountering issues. However, when I open the site and Vite connects via a socket (or similar method) to send the updated changes, the server breaks. It's possible that the browser imposes some restrictions that prevent Vite from canceling ongoing promises. |
Hey 👋 I've been trying to reproduce this issue in different scenarios without much luck.
Yes, this is because there are no requests to the worker if you don't have the site open.
The browser sends a request to Vite, which we then forward from Vite to the worker process that runs your backend code. Something you could try in your project to see if it has any effect: run the following code in your fetch handler inside export default {
fetch(request, ...) {
+ globalThis.__H2O_LOG_EVENT = undefined;
+ globalThis.__remix_devServerHooks = undefined;
// the rest of your code
}
} Following the stack trace in your video, it seems the issue is around this globalThis functions but I'm not able to get the error... |
I show you in the video it's a fresh project, all files is not touched, only the files i show is modified. The code you show me didn't do any difference. |
It's fixed! |
What is the location of your example repository?
no need
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
latest
What version of Remix are you using?
default version of hydrogen
Steps to Reproduce
Very simple, use mantine ui library as example
Expected Behavior
This is latest version of hydrogen.
720.mov
yes it's fast for few seconds, but breaks after few seconds.
Actual Behavior
Just try to change any text in any document.
The text was updated successfully, but these errors were encountered: