avyvar's picture
Add files using upload-large-folder tool
ddc98bc verified
|
Raw
History Blame Contribute Delete
1.15 kB

Fix Cache Components prerendering so dynamic route params omitted from generateStaticParams are not resolved into, or used to partition, cached prerenders.

For every Next.js environment, an on-demand request that matches a root-param value not already in the cache must resolve the root param into the appropriate branch while leaving params that generateStaticParams never provides deferred for each request. Requests that differ only in those omitted params should share the cached shell and still render their own correct param values. Existing fallback-shell behavior for generated root-param branches must remain intact.

Apply the same rule to adapter environments. A partially static route with no servable fallback—including one whose empty build-time shell causes it to become blocking—must vary cached prerenders only by root params and params that generateStaticParams can provide. Params it never provides must remain deferred rather than being baked into per-value prerenders. Keep this behavior consistent across the route's prerender artifacts, without regressing non-empty partial fallbacks or terminal shared entries.