-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Disabling WebSocket and HMR #18489
Comments
If you want to disable HMR, |
@sapphi-red Yes, I know that this directive exists. in library's
My proposed solution disables auto refresh, displays a warning, and provides users with the option to disable WebSocket. |
That error is showing that the WebSocket connection is failed. WebSocket is used for features other than HMR so it cannot be disabled. If |
I'm ok with the only feature of Vite to build JS and CSS. When I muted |
To summarize:
Both scenarios can be frustrating. Thank you! |
Guys, this is trivial. Please. I have a situation where I am doing a simple Disabling this feature only by setting the mode to production does not sound like a good idea. |
Description
Some users are actively seeking ways to disable HMR (#13994).
With HML enabled, and reactive components are partially rendered, it is unpredictable #18217 when page reload happens.
From my personal experience, the page reloads multiple times, even during simple navigation within the project.
Suggested solution
Please provide an option for users to disable WebSocket and HMR.
A single page reload after updating code in the editor is sufficient and might be optimal solution.
Fortunately, Vite is capable of updating CSS and JS files even without WebSocket enabled.
Alternative
Additional context
Normally I do not change the library's code. However, this changes made my developing experience much more predictable and less annoying with unexpected reloads.
Thanks.
Validations
The text was updated successfully, but these errors were encountered: