You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(breaking): Hard Deprecate PPR Configuration (#84280)
This hard deprecates the `experimental.ppr` configuration, requiring
users to opt-in instead via `experimental.cacheComponents`. This does
mean that the previous `experimental.ppr = "incremental"` will no longer
be supported.
NAR-433
Copy file name to clipboardExpand all lines: packages/next/errors.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -862,5 +862,6 @@
862
862
"861": "Client Max Body Size must be larger than 0 bytes",
863
863
"862": "Request body exceeded %s",
864
864
"863": "\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.",
865
-
"864": "Missing value for segment key: \"%s\" with dynamic param type: %s"
865
+
"864": "Missing value for segment key: \"%s\" with dynamic param type: %s",
866
+
"865": "`experimental.rdcForNavigations` is enabled, but `experimental.cacheComponents` is not."
it('errors when cacheComponents is enabled but PPR set to "incremental"',async()=>{
216
-
awaitexpect(
217
-
loadConfig(PHASE_PRODUCTION_BUILD,__dirname,{
218
-
customConfig: {
219
-
experimental: {
220
-
cacheComponents: true,
221
-
ppr: 'incremental',
222
-
},
223
-
},
224
-
})
225
-
).rejects.toThrow(
226
-
'`experimental.ppr` can not be `"incremental"` when `experimental.cacheComponents` is `true`. PPR is implicitly enabled when Cache Components is enabled.'
227
-
)
228
-
})
229
-
230
201
it('migrates experimental.dynamicIO to experimental.cacheComponents',async()=>{
`\`experimental.ppr\` has been merged into \`experimental.cacheComponents\`. The Partial Prerendering feature is still available, but is now enabled via \`experimental.cacheComponents\`. Please update your ${configFileName} accordingly.`
386
+
)
387
+
}
388
+
379
389
if(result.output==='export'){
380
390
if(result.i18n){
381
391
thrownewError(
@@ -1178,46 +1188,22 @@ function assignDefaultsAndValidate(
1178
1188
result.experimental.mcpServer=true
1179
1189
}
1180
1190
1191
+
// TODO: remove once we've finished migrating internally to cacheComponents.
1192
+
if(result.experimental.cacheComponents){
1193
+
result.experimental.ppr=true
1194
+
}
1195
+
1181
1196
// "use cache" was originally implicitly enabled with the cacheComponents flag, so
1182
1197
// we transfer the value for cacheComponents to the explicit useCache flag to ensure
// If cacheComponents is enabled, we also enable PPR.
1189
-
if(result.experimental.cacheComponents){
1190
-
if(
1191
-
userConfig.experimental?.ppr===false||
1192
-
userConfig.experimental?.ppr==='incremental'
1193
-
){
1194
-
thrownewError(
1195
-
`\`experimental.ppr\` can not be \`${JSON.stringify(userConfig.experimental?.ppr)}\` when \`experimental.cacheComponents\` is \`true\`. PPR is implicitly enabled when Cache Components is enabled.`
1196
-
)
1197
-
}
1198
-
1199
-
result.experimental.ppr=true
1200
-
1201
-
if(
1202
-
configuredExperimentalFeatures&&
1203
-
// If we've already noted that the `process.env.__NEXT_EXPERIMENTAL_CACHE_COMPONENTS`
1204
-
// has enabled the feature, we don't need to note it again.
0 commit comments