File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/runtime/src/helpers Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,18 @@ const preamble = /* js */ `
94
94
import {
95
95
decode as _base64Decode,
96
96
} from "https://deno.land/std@0.159.0/encoding/base64.ts";
97
+
98
+ import { AsyncLocalStorage } from "https://raw.githubusercontent.com/crowlKats/deno_std/asynclocalstorage/node/async_hooks.ts";
99
+
97
100
// Deno defines "window", but naughty libraries think this means it's a browser
98
101
delete globalThis.window
99
102
globalThis.process = { env: {...Deno.env.toObject(), NEXT_RUNTIME: 'edge', 'NEXT_PRIVATE_MINIMAL_MODE': '1' } }
100
103
globalThis.EdgeRuntime = "netlify-edge"
101
104
let _ENTRIES = {}
102
105
106
+ // Next.js expects this as a global
107
+ globalThis.AsyncLocalStorage = AsyncLocalStorage
108
+
103
109
// Next.js uses this extension to the Headers API implemented by Cloudflare workerd
104
110
if(!('getAll' in Headers.prototype)) {
105
111
Headers.prototype.getAll = function getAll(name) {
You can’t perform that action at this time.
0 commit comments