From 90d19d9dcdd6cd6048833ea84b904e57a67ae85f Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Mon, 11 Jul 2022 19:01:28 +0300 Subject: [PATCH] [next] Add EdgeRuntime provider environment variable to the builder This is based on the PR in https://github.com/vercel/next.js/pull/38331 --- packages/next/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/next/src/index.ts b/packages/next/src/index.ts index e5d71be9f3d..b67eff635ae 100644 --- a/packages/next/src/index.ts +++ b/packages/next/src/index.ts @@ -399,6 +399,7 @@ export const build: BuildV2 = async ({ const env: typeof process.env = { ...spawnOpts.env }; const memoryToConsume = Math.floor(os.totalmem() / 1024 ** 2) - 128; env.NODE_OPTIONS = `--max_old_space_size=${memoryToConsume}`; + env.NEXT_EDGE_RUNTIME_PROVIDER = 'vercel'; if (target) { // Since version v10.0.8-canary.15 of Next.js the NEXT_PRIVATE_TARGET env