Skip to content

Commit 75857cf

Browse files
authored
fix middleware for next 15 (#473)
* fix middleware for next 15 latest canary * Create angry-fans-kick.md
1 parent 220be99 commit 75857cf

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/angry-fans-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"open-next": patch
3+
---
4+
5+
fix middleware for next 15

packages/open-next/src/build/edge/createEdgeBundle.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ export async function buildEdgeBundle({
8989
const require = (await import("node:module")).createRequire(import.meta.url);
9090
const __filename = (await import("node:url")).fileURLToPath(import.meta.url);
9191
const __dirname = (await import("node:path")).dirname(__filename);
92+
93+
const defaultDefineProperty = Object.defineProperty;
94+
Object.defineProperty = function(o, p, a) {
95+
if(p=== '__import_unsupported') {
96+
return;
97+
}
98+
return defaultDefineProperty(o, p, a);
99+
};
92100
`
93101
}
94102
${additionalInject ?? ""}

0 commit comments

Comments
 (0)