File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/cloudflare/src/cli/build Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @opennextjs/cloudflare " : patch
3
+ ---
4
+
5
+ define \_\_ filename globally
Original file line number Diff line number Diff line change @@ -136,10 +136,11 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
136
136
platform : "node" ,
137
137
banner : {
138
138
js : `
139
- // __dirname is used by unbundled js files (which don't inherit the __dirname present in the define field)
139
+ // Used by unbundled js files (which don't inherit the __dirname present in the define field)
140
140
// so we also need to set it on the global scope
141
141
// Note: this was hit in the next/dist/compiled/@opentelemetry/api module
142
142
globalThis.__dirname ??= "";
143
+ globalThis.__filename ??= "";
143
144
144
145
// Do not crash on cache not supported
145
146
// https://github.com/cloudflare/workerd/pull/2434
You can’t perform that action at this time.
0 commit comments