Unverified Commit b8d8e6e7 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

dx: warn the deprecated cache configs are used (#60836)

Follow up for #57953 for DX, give better warnings

x-ref:
https://github.com/vercel/next.js/pull/60828#discussion_r1457736645

Closes NEXT-2156
parent c192f4ec
...@@ -178,6 +178,15 @@ export interface ExperimentalConfig { ...@@ -178,6 +178,15 @@ export interface ExperimentalConfig {
optimisticClientCache?: boolean optimisticClientCache?: boolean
middlewarePrefetch?: 'strict' | 'flexible' middlewarePrefetch?: 'strict' | 'flexible'
manualClientBasePath?: boolean manualClientBasePath?: boolean
/**
* @deprecated use config.cacheHandler instead
*/
incrementalCacheHandlerPath?: string
/**
* @deprecated use config.cacheMaxMemorySize instead
*
*/
isrMemoryCacheSize?: number
disablePostcssPresetEnv?: boolean disablePostcssPresetEnv?: boolean
swcMinify?: boolean swcMinify?: boolean
cpus?: number cpus?: number
......
...@@ -456,6 +456,26 @@ function assignDefaults( ...@@ -456,6 +456,26 @@ function assignDefaults(
} }
} }
if (result.experimental?.incrementalCacheHandlerPath) {
// TODO: Remove this warning in Next.js 15
warnOptionHasBeenDeprecated(
result,
'experimental.incrementalCacheHandlerPath',
'The "experimental.incrementalCacheHandlerPath" option has been renamed to "cacheHandler". Please update your next.config.js.',
silent
)
}
if (result.experimental?.isrMemoryCacheSize) {
// TODO: Remove this warning in Next.js 15
warnOptionHasBeenDeprecated(
result,
'experimental.isrMemoryCacheSize',
'The "experimental.isrMemoryCacheSize" option has been renamed to "cacheMaxMemorySize". Please update your next.config.js.',
silent
)
}
if (typeof result.experimental?.serverActions === 'boolean') { if (typeof result.experimental?.serverActions === 'boolean') {
// TODO: Remove this warning in Next.js 15 // TODO: Remove this warning in Next.js 15
warnOptionHasBeenDeprecated( warnOptionHasBeenDeprecated(
......
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