Unverified Commit c50109b4 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

[Turbopack] change persistent caching option to a boolean (#72458)

### What?

Change the option to a boolean, the number version is weird and unexpected.

Closes PACK-3418
parent 560bb266
......@@ -152,10 +152,8 @@ export interface ExperimentalTurboOptions {
/**
* Enable persistent caching for the turbopack dev server and build.
* Need to provide the expected level of stability, otherwise it will fail.
* Currently stability level: 1
*/
unstablePersistentCaching?: number | false
unstablePersistentCaching?: boolean
/**
* Enable tree shaking for the turbopack dev server and build.
......
......@@ -1205,11 +1205,5 @@ export function normalizedPageToTurbopackStructureRoute(
export function isPersistentCachingEnabled(
config: NextConfigComplete
): boolean {
const unstableValue = config.experimental.turbo?.unstablePersistentCaching
if (typeof unstableValue === 'number' && unstableValue > 1) {
throw new Error(
'Persistent caching in this version of Turbopack is not as stable as expected. Upgrade to a newer version of Turbopack to use this feature with the expected stability.'
)
}
return !!unstableValue
return config.experimental.turbo?.unstablePersistentCaching || false
}
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