next.js
ac6d9932 - Add unstable_prefetch route segment config and decouple runtime prefetching from unstable_instant (#92754)

Commit
2 days ago
Add unstable_prefetch route segment config and decouple runtime prefetching from unstable_instant (#92754) Allows you to opt into runtime prefetching without coupling it to the way you configure instant validation. We do not intend to allow shipping runtime prefetching without opting into instant validation unless you specifically disable the validation because the cost of the runtime prefetching is potentially high but the way you configure validation is likely going to be pulling in lots of test code and we want to make it easier to discern that the validation code is not going to be bundled into production builds so separating the config is helpful. Another reason to separate the config is that we expect that eventually most prefetching is configured globally and you do not need to opt specific segments into a different prefetching strategy. Improved client component error messages to accurately describe the constraint: these are route segment configs that require a Server Component module, not exports that are forbidden.
Author
Parents
Loading