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
I'm currently also working on a project with Vite and Socket.io and I can only make it work in this way (websocket first), polling doesn't work when I run my project with npm run dev.
However if I build my project (with polling first) and deploy than it does work!
I was wondering if you had the same problems and perhaps this is a subtle bug with combining Vite and Socket.io.
The text was updated successfully, but these errors were encountered:
Seems to be a bug with Vite and Socket.io-client 4.2.x
I've installed socket.io-client 4.1.3 and polling works as first option :)
I think this is better as there is no fallback from the websocket first approach. It just fails, this way we use polling first and upgrade to websocket. If there's a problem we revert back to polling.
I see that when you create a new socket connection you specify to try a websocket first (default is polling first)
chatroom/src/compositions/socket.ts
Line 6 in de3f276
I'm currently also working on a project with Vite and Socket.io and I can only make it work in this way (websocket first), polling doesn't work when I run my project with npm run dev.
However if I build my project (with polling first) and deploy than it does work!
I was wondering if you had the same problems and perhaps this is a subtle bug with combining Vite and Socket.io.
The text was updated successfully, but these errors were encountered: