-
-
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
Vite tries to reconnect to websocket every second #5228
Comments
I just started noticing this today as I've been connecting and disconnecting frequently. However, I think the issue may be more of a workflow-related matter as one can |
Is there any solution to this? I run laravel through homestead on virtualbox, for front end development I'll run vite on my local (windows) env on pwsh and no matter how I configure the I noticed vite doesn't care what I give it for server options, it will always use whatever host I connect to which isn't what I want. is there any way I can change this? or am I misunderstanding the server options? |
would what I mentioned in #4411 help? |
Clear and concise description of the problem
This was reported earlier as #1989 by @ikmrgrv but dismissed:
This kind of cleverness causes memory bloat in browsers for users that choose to keep the tab open after CTRL+Cing the server without intention to immediately continue development, since it accumulates tens of thousands of errors with no way to disable, in addition to being a general waste of cycles.
More annoyingly, when starting
rails server
, which also uses port 3000, I get an unwelcome request to my rails server if I had vite running earlier:/__vite_ping
, and the page suddenly refreshes and displays something completely different.Hot reload and HMR are great, but we don't have to go so far as to completely control the browser for the user like this.
Suggested solution
Please make this configurable. Ideally, this should be disabled by default. Users know to load the page when they start a server. Reloading blindly after a server was shutdown is going too far in my opinion.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: