Skip to content

Commit 0230cbe

Browse files
authored
fix for setImmediate/clearImmediate (#1057)
1 parent ac9cb45 commit 0230cbe

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/modern-symbols-send.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
Do not inject setImmediate/clearImmediate in the global scope

packages/cloudflare/src/cli/build/bundle-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export async function bundleServer(buildOpts: BuildOptions, projectOpts: Project
152152
banner: {
153153
// We need to import them here, assigning them to `globalThis` does not work because node:timers use `globalThis` and thus create an infinite loop
154154
// See https://github.com/cloudflare/workerd/blob/d6a764c/src/node/internal/internal_timers.ts#L56-L70
155-
js: `import {setInterval, clearInterval, setTimeout, clearTimeout, setImmediate, clearImmediate} from "node:timers"`,
155+
js: `import {setInterval, clearInterval, setTimeout, clearTimeout} from "node:timers"`,
156156
},
157157
platform: "node",
158158
});

0 commit comments

Comments
 (0)