Skip to content

Commit d3a2bde

Browse files
committed
change overriding to only be the env obj
1 parent 9ecefdf commit d3a2bde

File tree

1 file changed

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

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ const cloudflareContextALS = new AsyncLocalStorage<CloudflareContext>();
2020
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2121
(globalThis as any)[Symbol.for("__cloudflare-context__")] = createALSProxy(cloudflareContextALS);
2222

23-
globalThis.process = {
24-
...globalThis.process,
25-
// @ts-expect-error - populated when we run inside the ALS context
26-
env: createALSProxy(processEnvALS),
27-
};
23+
// @ts-expect-error - populated when we run inside the ALS context
24+
globalThis.process.env = createALSProxy(processEnvALS);
2825

2926
// Injected at build time
3027
const nextConfig: NextConfig = JSON.parse(process.env.__NEXT_PRIVATE_STANDALONE_CONFIG ?? "{}");

0 commit comments

Comments
 (0)