Unverified Commit 99e584c7 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

use __NEXT_VERSION compile time replacement (#57512)

process.env.__NEXT_VERSION is replaced at with a static version

Closes WEB-1888
parent 31c2f976
......@@ -24,7 +24,6 @@ import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'
import { ZodParsedType, util as ZodUtil } from 'next/dist/compiled/zod'
import type { ZodError, ZodIssue } from 'next/dist/compiled/zod'
import { hasNextSupport } from '../telemetry/ci-info'
import { version } from 'next/package.json'
export { normalizeConfig } from './config-shared'
export type { DomainLocale, NextConfig } from './config-shared'
......@@ -253,7 +252,10 @@ function assignDefaults(
const result = { ...defaultConfig, ...config }
if (result.experimental?.ppr && !version.includes('canary')) {
if (
result.experimental?.ppr &&
!process.env.__NEXT_VERSION!.includes('canary')
) {
Log.warn(
`The experimental.ppr feature is present in your current version but we recommend using the latest canary version for the best experience.`
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment