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
@yyx990803 the issue is pretty close but a bit different, the goal here is not to run ws on a different port / host but having the connection done to the right host / port. Feel free to merge the issue if you think it's the same problem.
Describe the bug
I'm currently trying to use vite to serve assets for a backend generated site.
The site is available on http://localhost:8000
Vite is server on http://localhost:3000
ws is established using ws://localhost:8000 instead of ws://localhost:3000
Reproduction
If you inspect /vite/hmr you find this line :
const socket = new WebSocket(
${socketProtocol}://${location.host}
);System Info
vite
version:Suggestion / Solution
Could the websocket path using the port / location from vite dev server ?
In the meantime this issue can be solved using a koah middleware
The text was updated successfully, but these errors were encountered: