Commit e9ef3b8
authored
feat(next): improve fallback root params handling with hasFallbackRootParams flag (#13653)
## Summary
This PR improves the handling of fallback root parameters by introducing
a `hasFallbackRootParams` flag to simplify route regex generation and
enhance prerender manifest processing.
## Changes
- Add `hasFallbackRootParams` flag to `RoutesManifestRoute` type for
better type safety
- Simplify route regex generation when `hasFallbackRootParams` is true
by using a more direct `.rsc` suffix
- Update prerender manifest handling for both fallback and blocking
fallback routes
- Improve conditional logic for fallback root params processing in the
prerender route handler
## Test plan
- [ ] Verify existing tests pass
- [ ] Test route generation with and without fallback root params
- [ ] Validate prerender manifest structure includes new fields
Related Pull Request: vercel/next.js#822821 parent a78f91c commit e9ef3b8
File tree
2 files changed
+48
-6
lines changed- .changeset
- packages/next/src
2 files changed
+48
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
227 | 239 | | |
228 | 240 | | |
229 | 241 | | |
| |||
473 | 485 | | |
474 | 486 | | |
475 | 487 | | |
| 488 | + | |
476 | 489 | | |
477 | 490 | | |
478 | 491 | | |
| |||
540 | 553 | | |
541 | 554 | | |
542 | 555 | | |
543 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
544 | 563 | | |
545 | | - | |
546 | 564 | | |
547 | 565 | | |
548 | 566 | | |
| |||
1078 | 1096 | | |
1079 | 1097 | | |
1080 | 1098 | | |
| 1099 | + | |
1081 | 1100 | | |
1082 | 1101 | | |
1083 | 1102 | | |
| |||
1285 | 1304 | | |
1286 | 1305 | | |
1287 | 1306 | | |
| 1307 | + | |
1288 | 1308 | | |
1289 | 1309 | | |
1290 | 1310 | | |
| |||
1391 | 1411 | | |
1392 | 1412 | | |
1393 | 1413 | | |
1394 | | - | |
1395 | | - | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
1396 | 1421 | | |
1397 | 1422 | | |
1398 | 1423 | | |
| |||
1407 | 1432 | | |
1408 | 1433 | | |
1409 | 1434 | | |
| 1435 | + | |
| 1436 | + | |
1410 | 1437 | | |
1411 | 1438 | | |
1412 | 1439 | | |
| |||
1551 | 1578 | | |
1552 | 1579 | | |
1553 | 1580 | | |
| 1581 | + | |
1554 | 1582 | | |
1555 | 1583 | | |
1556 | 1584 | | |
| |||
2789 | 2817 | | |
2790 | 2818 | | |
2791 | 2819 | | |
2792 | | - | |
| 2820 | + | |
2793 | 2821 | | |
2794 | 2822 | | |
2795 | 2823 | | |
2796 | | - | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
2797 | 2830 | | |
2798 | 2831 | | |
2799 | 2832 | | |
| |||
0 commit comments