Skip to content

Commit 18e755d

Browse files
apply suggested change
1 parent 30683e7 commit 18e755d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/cloudflare/src/api/cloudflare-context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ export function getCloudflareContext<
8484
}
8585

8686
// Note: Next.js sets process.env.NEXT_RUNTIME to 'nodejs' when the runtime in use is the node.js one
87-
// source: https://github.com/vercel/next.js/blob/1e8603113/packages/next/src/build/webpack/plugins/define-env-plugin.ts#L179-L183
87+
// We want to detect when the runtime is the node.js one so that during development (`next dev`) we know wether
88+
// we are or not in a node.js process and that access to wrangler's node.js apis
8889
const inNodejsRuntime = process.env.NEXT_RUNTIME === "nodejs";
8990

9091
// Note: Next.js sets globalThis.__NEXT_DATA__.nextExport to true for SSG routes

0 commit comments

Comments
 (0)