wxt
wxt copied to clipboard
How used the socket.io library in the background.js
Hello, have you ever used the socket.io library in the background.js of wxt, specifically the "socket.io-client": "^4.7.5" version? While it connects and listens to various events successfully in regular projects, I'm unable to receive success or failure events in my wxt project. How do you typically utilize socket.io in such a setup?
Sorry, I can't help with this. Never used socket.io before, but I don't see why it wouldn't work...
We're using socket.io in our extension right now as a legacy option but we don't have any issues at all with it, we do pass the transports option to it
io("http://localhost:3020", {
transports: ["websocket"],
});
I don't remember why we use websocket as the only transport, might be because we faced the same issue you are facing.