We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30683e7 commit 18e755dCopy full SHA for 18e755d
packages/cloudflare/src/api/cloudflare-context.ts
@@ -84,7 +84,8 @@ export function getCloudflareContext<
84
}
85
86
// 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
+ // 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
89
const inNodejsRuntime = process.env.NEXT_RUNTIME === "nodejs";
90
91
// Note: Next.js sets globalThis.__NEXT_DATA__.nextExport to true for SSG routes
0 commit comments