Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/cloudflare/src/cli/templates/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ function initRuntime() {
__BUILD_TIMESTAMP_MS__: __BUILD_TIMESTAMP_MS__,
__NEXT_BASE_PATH__: __NEXT_BASE_PATH__,
});

// Some packages rely on `import.meta.url` (i.e. payload) but it is undefined in workerd
// It cause a bunch of issue, and will make even import crash
// TODO: verify that it won't cause other issues later with other packages
import.meta.url = "file:///worker.js";
}

/**
Expand Down