Commit b9782f7
committed
fix(hosting): serve Nuxt bare prerendered routes from S3 (frozen, no SSR)
The nitro adapter emitted only the subtree route (/about/*) for each
prerendered page, leaving the bare canonical URL (/about) to fall through
to the SSR Lambda — which re-rendered a prerender:true page on every
request, breaking the 'frozen, served from S3, no Lambda' contract.
The router's directory-index rewrite now appends /index.html to any
extensionless path, so a bare path resolves to builds/<id>/<route>/index.html
(exactly how Nuxt prerenders /about -> about/index.html). Emit BOTH the bare
route and its subtree as static for both the filesystem walk and the
routeRules prerender loop. Add a kvs_router regression test asserting
/myapp/about routes to S3 and rewrites to the frozen index.html.1 parent d129af0 commit b9782f7
2 files changed
Lines changed: 57 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1438 | 1445 | | |
1439 | | - | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | | - | |
1445 | | - | |
1446 | | - | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
1447 | 1451 | | |
1448 | 1452 | | |
1449 | 1453 | | |
1450 | 1454 | | |
| 1455 | + | |
1451 | 1456 | | |
1452 | 1457 | | |
1453 | 1458 | | |
1454 | 1459 | | |
1455 | 1460 | | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
1460 | 1466 | | |
1461 | 1467 | | |
1462 | 1468 | | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1467 | 1475 | | |
1468 | 1476 | | |
1469 | 1477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
588 | 620 | | |
589 | 621 | | |
590 | 622 | | |
| |||
0 commit comments