Skip to content

Commit 340a9f7

Browse files
ijjkfeedthejim
andauthored
Update experimental config check (#57505)
As discussed updates the warning with experimental config --------- Co-authored-by: Jimmy Lai <[email protected]>
1 parent 356dc42 commit 340a9f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/next/src/server/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'
2424
import { ZodParsedType, util as ZodUtil } from 'next/dist/compiled/zod'
2525
import type { ZodError, ZodIssue } from 'next/dist/compiled/zod'
2626
import { hasNextSupport } from '../telemetry/ci-info'
27+
import { version } from 'next/package.json'
2728

2829
export { normalizeConfig } from './config-shared'
2930
export type { DomainLocale, NextConfig } from './config-shared'
@@ -252,6 +253,12 @@ function assignDefaults(
252253

253254
const result = { ...defaultConfig, ...config }
254255

256+
if (result.experimental?.ppr && !version.includes('canary')) {
257+
Log.warn(
258+
`The experimental.ppr feature is present in your current version but we recommend using the latest canary version for the best experience.`
259+
)
260+
}
261+
255262
if (result.output === 'export') {
256263
if (result.i18n) {
257264
throw new Error(

0 commit comments

Comments
 (0)