We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c525ee9 commit c4d278eCopy full SHA for c4d278e
.changeset/soft-rats-punch.md
@@ -0,0 +1,5 @@
1
+---
2
+"@opennextjs/cloudflare": patch
3
4
+
5
+polyfill import.meta.url
packages/cloudflare/src/cli/templates/init.ts
@@ -61,6 +61,9 @@ function initRuntime() {
61
62
globalThis.__dirname ??= "";
63
globalThis.__filename ??= "";
64
+ // Some packages rely on `import.meta.url` but it is undefined in workerd
65
+ // For example it causes a bunch of issues, and will make even import crash with payload
66
+ import.meta.url ??= "file:///worker.js";
67
68
// Do not crash on cache not supported
69
// https://github.com/cloudflare/workerd/pull/2434
0 commit comments