Skip to content

Commit

Permalink
[next] Add EdgeRuntime provider environment variable to the builder
Browse files Browse the repository at this point in the history
This is based on the PR in vercel/next.js#38331
  • Loading branch information
Schniz committed Jul 11, 2022
1 parent ec9b55d commit 90d19d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/next/src/index.ts
Expand Up @@ -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
Expand Down

0 comments on commit 90d19d9

Please sign in to comment.