File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
packages/open-next/src/build/edge Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -130,21 +130,22 @@ globalThis.Buffer = Buffer;
130130
131131import {AsyncLocalStorage} from "node:async_hooks";
132132globalThis.AsyncLocalStorage = AsyncLocalStorage;
133+
134+ const defaultDefineProperty = Object.defineProperty;
135+ Object.defineProperty = function(o, p, a) {
136+ if(p=== '__import_unsupported' && Boolean(globalThis.__import_unsupported)) {
137+ return;
138+ }
139+ return defaultDefineProperty(o, p, a);
140+ };
141+
133142 ${
134143 isInCloudfare
135144 ? ""
136145 : `
137146 const require = (await import("node:module")).createRequire(import.meta.url);
138147 const __filename = (await import("node:url")).fileURLToPath(import.meta.url);
139148 const __dirname = (await import("node:path")).dirname(__filename);
140-
141- const defaultDefineProperty = Object.defineProperty;
142- Object.defineProperty = function(o, p, a) {
143- if(p=== '__import_unsupported' && Boolean(globalThis.__import_unsupported)) {
144- return;
145- }
146- return defaultDefineProperty(o, p, a);
147- };
148149 `
149150 }
150151 ${ additionalInject ?? "" }
You can’t perform that action at this time.
0 commit comments