Closed paralin closed 10 months ago
@achingbrain Hi - still need this, I've been using this hack:
import WebSocket from 'it-ws/dist/src/web-socket.js'
But that doesn't work anymore as it's not in exports.
I went ahead and sent a PR: #99
It’s worth noting that node 21 will have a websocket implementation so you should probably switch to that when it’s no longer behind a flag.
@achingbrain thanks. Does that also work in the web browser? I guess it would since the type is available in both places natively.
Yes, it’ll be global in both environments.
import WebSocket from 'it-ws/dist/src/web-socket.js';
Would it be possible to add an export for
import WebSocket from 'it-ws/websocket'
?Thanks.