We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WebSocket
1 parent c1ae0f1 commit 82c57c6Copy full SHA for 82c57c6
.changeset/witty-camels-remember.md
@@ -0,0 +1,5 @@
1
+---
2
+"@solana/ws-impl": patch
3
4
+
5
+Use native `WebSocket` for compatibility with server runtimes that support it, like Deno
packages/ws-impl/src/index.node.ts
@@ -1,4 +1,6 @@
// When building the browser bundle, this import gets replaced by `globalThis.WebSocket`.
import WebSocketImpl from 'ws';
-export default WebSocketImpl;
+export default globalThis.WebSocket
+ ? globalThis.WebSocket // Use native `WebSocket` in runtimes that support it (eg. Deno)
6
+ : WebSocketImpl;
0 commit comments