Skip to content

Commit

Permalink
auto enable in experimental build
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Oct 23, 2024
1 parent 6b014c9 commit f332052
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/next/src/build/webpack/plugins/define-env-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ export function getDefineEnv({
const nextPublicEnv = getNextPublicEnvironmentVariables()
const nextConfigEnv = getNextConfigEnv(config)

const isPPREnabled = checkIsAppPPREnabled(config.experimental.ppr)
const isDynamicIOEnabled = !!config.experimental.dynamicIO
const isOwnerStackEnabled = Boolean(config.experimental.reactOwnerStack)

const defineEnv: DefineEnv = {
// internal field to identify the plugin config
__NEXT_DEFINE_ENV: true,
Expand Down Expand Up @@ -183,11 +187,10 @@ export function getDefineEnv({
'process.env.__NEXT_APP_ISR_INDICATOR': Boolean(
config.devIndicators.appIsrStatus
),
'process.env.__NEXT_PPR': checkIsAppPPREnabled(config.experimental.ppr),
'process.env.__NEXT_DYNAMIC_IO': !!config.experimental.dynamicIO,
'process.env.__NEXT_REACT_OWNER_STACK': Boolean(
config.experimental.reactOwnerStack
),
'process.env.__NEXT_PPR': isPPREnabled,
'process.env.__NEXT_DYNAMIC_IO': isDynamicIOEnabled,
'process.env.__NEXT_REACT_OWNER_STACK':
isPPREnabled || isDynamicIOEnabled || isOwnerStackEnabled,
'process.env.__NEXT_AFTER': config.experimental.after ?? false,
'process.env.NEXT_DEPLOYMENT_ID': config.deploymentId || false,
'process.env.__NEXT_FETCH_CACHE_KEY_PREFIX': fetchCacheKeyPrefix ?? '',
Expand Down

0 comments on commit f332052

Please sign in to comment.