-
Notifications
You must be signed in to change notification settings - Fork 3k
Does not work with Vite.js and vue 3. #1492
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
Comments
Could you please provide a complete example reproducing the issue? Thanks! |
I am sorry, not expert in programming explaining. So the problem is the simplest code above works with webpack(vue-cli) but not work with vite.js +vue. I created full repo example, https://github.com/Taykavol/socket.io-vite-and-vue-cli-example Client const socket = io("ws://localhost:4000/", {}); socket.on("connect", () => { socket.on("disconnect", () => { |
Also, now I checked that the versons(client) 4.1.x works great (event with socket.io server 4.2.0) but something wrong with 4.2.0 client. |
can confirm. not sure how to debug this also see vitejs/vite#4798 |
Please see my answer here: vitejs/vite#4798 (comment) |
It should be fixed now:
Please reopen if needed. |
Describe the bug
The same code with webpack works. But Vite.js + Vue 3 is not. There is even no requests. Probably it's not problem of socket.io-client package but something wrong with socket.io-client.
To Reproduce
Socket.IO server version:
4.2.0
Server
Socket.IO client version:
4.2.0
Client
Expected behavior
Expected to see console.log messages on server and client. But it's not working at all.
Platform:
The text was updated successfully, but these errors were encountered: