Skip to content

Commit b6d99d6

Browse files
committed
config.experimental.turbo.unstablePersistentCaching -> config.experimental.turbopackPersistentCaching
1 parent 845d7d9 commit b6d99d6

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Diff for: packages/next/src/server/config-shared.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ export interface TurbopackOptions {
149149
*/
150150
memoryLimit?: number
151151

152-
/**
153-
* Enable persistent caching for the turbopack dev server and build.
154-
*/
155-
unstablePersistentCaching?: boolean
156-
157152
/**
158153
* Enable tree shaking for the turbopack dev server and build.
159154
*/
@@ -386,7 +381,12 @@ export interface ExperimentalConfig {
386381
/**
387382
* @deprecated Use `config.turbopack` instead.
388383
*/
389-
turbo?: TurbopackOptions
384+
turbo?: DeprecatedExperimentalTurboOptions
385+
386+
/**
387+
* Enable persistent caching for the turbopack dev server and build.
388+
*/
389+
turbopackPersistentCaching?: boolean
390390

391391
/**
392392
* For use with `@next/mdx`. Compile MDX files using the new Rust compiler.

Diff for: packages/next/src/server/config.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ function assignDefaults(
251251
throw new CanaryOnlyError({ feature: 'experimental.ppr' })
252252
} else if (result.experimental?.dynamicIO) {
253253
throw new CanaryOnlyError({ feature: 'experimental.dynamicIO' })
254-
} else if (result.experimental?.turbo?.unstablePersistentCaching) {
254+
} else if (result.experimental?.turbopackPersistentCaching) {
255255
throw new CanaryOnlyError({
256-
feature: 'experimental.turbo.unstablePersistentCaching',
256+
feature: 'experimental.turbopackPersistentCaching',
257257
})
258258
} else if (result.experimental?.nodeMiddleware) {
259259
throw new CanaryOnlyError({ feature: 'experimental.nodeMiddleware' })
@@ -1280,6 +1280,11 @@ export default async function loadConfig(
12801280
userConfig.experimental.turbo.rules = rules
12811281
}
12821282

1283+
if (userConfig.experimental?.turbo?.unstablePersistentCaching != null) {
1284+
userConfig.experimental.turbopackPersistentCaching =
1285+
userConfig.experimental.turbo.unstablePersistentCaching
1286+
}
1287+
12831288
if (userConfig.experimental?.turbo) {
12841289
Log.warnOnce(
12851290
'The next config property `experimental.turbo` is deprecated as Turbopack has been stabilized. Please move this configuration to `config.turbopack`.'

0 commit comments

Comments
 (0)