Skip to content

Commit

Permalink
remove context.WebSocket
Browse files Browse the repository at this point in the history
edge-runtime already expose it
  • Loading branch information
Kikobeats committed Jun 1, 2023
1 parent 93dd7aa commit 2aae887
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions packages/next/src/server/node-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ if (typeof (globalThis as any).AsyncLocalStorage !== 'function') {
const { AsyncLocalStorage } = require('async_hooks')
;(globalThis as any).AsyncLocalStorage = AsyncLocalStorage
}

if (typeof (globalThis as any).WebSocket !== 'function') {
;(globalThis as any).WebSocket = require('next/dist/compiled/ws').WebSocket
}
1 change: 0 additions & 1 deletion packages/next/src/server/web/sandbox/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ async function createModuleContext(options: ModuleContextOptions) {
? { strings: true, wasm: true }
: undefined,
extend: (context) => {
context.WebSocket = require('next/dist/compiled/ws').WebSocket
context.process = createProcessPolyfill()

Object.defineProperty(context, 'require', {
Expand Down

0 comments on commit 2aae887

Please sign in to comment.