Skip to content

Commit

Permalink
Update experimental config check (#57505)
Browse files Browse the repository at this point in the history
As discussed updates the warning with experimental config

---------

Co-authored-by: Jimmy Lai <laijimmy0@gmail.com>
  • Loading branch information
ijjk and feedthejim committed Oct 26, 2023
1 parent 356dc42 commit 340a9f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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'
Expand Down Expand Up @@ -252,6 +253,12 @@ function assignDefaults(

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

if (result.experimental?.ppr && !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.`
)
}

if (result.output === 'export') {
if (result.i18n) {
throw new Error(
Expand Down

0 comments on commit 340a9f7

Please sign in to comment.