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:
JJ Kasper 2023-10-26 06:04:22 -07:00 committed by GitHub
parent 356dc42f1a
commit 340a9f7b3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(