You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hipi
changed the title
If HMR connection is disabled, I think it's not necessary to connect to websocket
If HMR is disabled, I think it's not necessary to connect to websocket
Dec 30, 2021
This is so evident and takes so much time to be treated it's disappointing, I love vite but if my production site refreshes the page every minute because of a websocket it don't need, I can't disable it for some reasons and nothing gets done about it for months why bother.
This was unexpected behaviour for me - I had this occur when using codespaces, and the page continued to refresh when it was disabled.
I tried opening the port for HMR, but the port-forwarding on codespaces maps ports to subdomains, and I decided to develop locally instead of trying to find a way to tell Vite to use a completely different url or set up a reverse proxy just for HMR.
The websocket is used for more than just HMR, including showing error overlay from server and trigger full page reloads from plugins. Having server.hmr: false turn those off could be confusing (maybe not as destructive if we have docs). Otherwise perhaps #6090 might help here too.
This feature request seems to be requested to prevent the infinite reload problem.
I'm closing this issue because #9007 fixed that problem.
If there is other reasons, please create a new issue with the reason.
Clear and concise description of the problem
when
packages/vite/src/client/client.ts
should not connect to WebsocketSuggested solution
packages/vite/src/client/client.ts
add configurationAlternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: