wxt icon indicating copy to clipboard operation
wxt copied to clipboard

How used the socket.io library in the background.js

Open QuietlyChan opened this issue 1 year ago • 2 comments

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?

QuietlyChan avatar Jun 12 '24 09:06 QuietlyChan

Sorry, I can't help with this. Never used socket.io before, but I don't see why it wouldn't work...

aklinker1 avatar Jun 17 '24 19:06 aklinker1

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.

Timeraa avatar Jul 26 '24 13:07 Timeraa