Skip to content

Commit

Permalink
Add process.env.__NEXT_PPR to build config
Browse files Browse the repository at this point in the history
Adds process.env.__NEXT_PPR as static flag that it gets inlined by
DefinePlugin during build.

This matches what we do for other experiments, but I do wonder, why do
we bother with process.env at all instead of a global __NEXT_PPR symbol?
I'll leave that for later discussion.
  • Loading branch information
acdlite committed Dec 4, 2023
1 parent 15215d4 commit 514dc75
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export function getDefineEnv({
'process.env.__NEXT_WINDOW_HISTORY_SUPPORT': JSON.stringify(
config.experimental.windowHistorySupport
),
'process.env.__NEXT_PPR': JSON.stringify(config.experimental.ppr === true),
'process.env.__NEXT_ACTIONS_DEPLOYMENT_ID': JSON.stringify(
config.experimental.useDeploymentIdServerActions
),
Expand Down

0 comments on commit 514dc75

Please sign in to comment.