next.js
d016157c - Remove param values from static route tree (#82376)

Commit
141 days ago
Remove param values from static route tree (#82376) Removes the param values from the router tree sent by the server during a client-side prefetch. This increases the cacheability of prefetch responses because if the response does not include a certain param in the component data, it can be reused for all possible values of that param. Previously this was not possible because even if the components did not reference a param, it was included in the router tree regardless. This does not affect the router tree sent during dynamic navigations, or during initial render. We should remove the param values from those responses, too, both for consistency and to increase the cacheability of HTML fallback responses. That work will land in future PRs.
Author
Parents
Loading