Support Variants on adapter deployments
This change extends `experimental.variants` to adapter-based deployments. The adapter emits per-combination prerender outputs and routes document, RSC, and segment-prefetch requests to them. The Node Proxy output includes the Variants manifest so request-time resolution can select the available static variant combinations. Deployment requests preserve the selected combination through on-demand prerendering, partially resolved shells, and revalidation. The origin receives runtime variant values, and non-PPR prerenders bypass their cache when those values require a request render. Public route parameters remain separate from internal artifact paths. The routing handles root paths, required and optional catch-all routes, base paths, and route collapsing. Additional combinations produce separate prerender outputs without multiplying routing entries. Collapsed routes preserve the selected shell and requested payload form without changing prerender output paths. The existing Variants suites now run against adapter deployments. Additional regression coverage checks routing precedence, prefetches, partially resolved shells, and root revalidation. Adapter tests verify route uniqueness, stable ordering, and routing size independent of the combination count. Deployment support requires the adapter API. The legacy deployment builder is not supported, while self-hosted dev and start continue to work without an adapter. Variants remains experimental, with the existing Turbopack and Node Proxy requirements. Anti-forgery checks for client-supplied variant prefixes and `nxtV` follow in the next change in this stack.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment