Update experimental config check (#57505)
As discussed updates the warning with experimental config --------- Co-authored-by: Jimmy Lai <laijimmy0@gmail.com>
This commit is contained in:
parent
356dc42f1a
commit
340a9f7b3e
1 changed files with 7 additions and 0 deletions
|
@ -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'
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue