Unverified Commit 340a9f7b authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update experimental config check (#57505)

As discussed updates the warning with experimental config

---------
Co-authored-by: 's avatarJimmy Lai <laijimmy0@gmail.com>
parent 356dc42f
...@@ -24,6 +24,7 @@ import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix' ...@@ -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 { ZodParsedType, util as ZodUtil } from 'next/dist/compiled/zod'
import type { ZodError, ZodIssue } from 'next/dist/compiled/zod' import type { ZodError, ZodIssue } from 'next/dist/compiled/zod'
import { hasNextSupport } from '../telemetry/ci-info' import { hasNextSupport } from '../telemetry/ci-info'
import { version } from 'next/package.json'
export { normalizeConfig } from './config-shared' export { normalizeConfig } from './config-shared'
export type { DomainLocale, NextConfig } from './config-shared' export type { DomainLocale, NextConfig } from './config-shared'
...@@ -252,6 +253,12 @@ function assignDefaults( ...@@ -252,6 +253,12 @@ function assignDefaults(
const result = { ...defaultConfig, ...config } 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.output === 'export') {
if (result.i18n) { if (result.i18n) {
throw new Error( throw new Error(
......
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