Skip to content

Commit a9f7ec4

Browse files
committed
remove process.env.node_env usage
1 parent a107abb commit a9f7ec4

File tree

1 file changed

+2
-2
lines changed
  • packages/cloudflare/src/cli/templates

1 file changed

+2
-2
lines changed

packages/cloudflare/src/cli/templates/worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const cloudflareContextALS = new AsyncLocalStorage<CloudflareContext>();
2121
}
2222
);
2323

24-
async function applyProjectEnvVars(mode = "production") {
24+
async function applyProjectEnvVars(mode: string) {
2525
if (process.env.__OPENNEXT_PROCESSED_ENV === "1") return;
2626

2727
// @ts-expect-error: resolved by wrangler build
@@ -49,7 +49,7 @@ export default {
4949
},
5050
});
5151

52-
await applyProjectEnvVars(env.NEXTJS_ENV ?? globalThis.process.env.NODE_ENV);
52+
await applyProjectEnvVars(env.NEXTJS_ENV ?? "production");
5353

5454
// The Middleware handler can return either a `Response` or a `Request`:
5555
// - `Response`s should be returned early

0 commit comments

Comments
 (0)