Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip seeding prefetch cache in development (#72191)
Since prefetching is disabled in development, seeding the prefetch cache for the initially rendered page can lead to an inconsistent navigation experience, where the initially visited page won't behave the same as subsequent pages that you navigate to. We should ultimately get to a place where the prefetch behavior is consistent between dev/start to keep the production behavior as consistent as possible with the development experience, but when we do so, we would want to enable it across the board. This happens to fix a bug with dynamicIO because the server-patch action (which happens when data is missing for a rendered segment) was mismatching the router state tree, which triggers a hard navigation to recover. This happens to fix the issue because the router never hits the server patch case, which is when the hard navigation could occur. Separately, we're working to verify why the seeded prefetch entry might have caused this change in behavior only in dev. Note: this modifies a navigation test that was asserting on RSC requests taking place, which will now happen in dev as there'll be no prefetch entry. Fixes #72150
- Loading branch information