Skip to content

Commit

Permalink
edge: expose Websocket constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 26, 2023
1 parent 6902e5b commit 3560ba7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/next/package.json
Expand Up @@ -297,7 +297,7 @@
"timers-browserify": "2.0.12",
"tty-browserify": "0.0.1",
"ua-parser-js": "0.7.28",
"undici": "5.14.0",
"undici": "5.22.0",
"unistore": "3.4.1",
"util": "0.12.4",
"uuid": "8.3.2",
Expand Down
5 changes: 3 additions & 2 deletions packages/next/src/compiled/undici/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/src/server/web/sandbox/context.ts
Expand Up @@ -235,6 +235,7 @@ async function createModuleContext(options: ModuleContextOptions) {
? { strings: true, wasm: true }
: undefined,
extend: (context) => {
context.WebSocket = require('next/dist/compiled/undici').WebSocket
context.process = createProcessPolyfill(options)

Object.defineProperty(context, 'require', {
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3560ba7

Please sign in to comment.