next.js
d86e1977 - Support configuring a default instant validation level (#93301)

Commit
1 day ago
Support configuring a default instant validation level (#93301) Adds `experimental.instantInsights.validationLevel` so an app can opt into instant validation for all routes by default. There are two public levels * `manual-warning`: currently the default. this mode won't enable instant validation except where you add `export const unstable_instant = true` into your Layouts, Pages, and Default files * `warning`: This mode will enable instant validation for all Page and Default files. You can override this with `export const unstable_instant = false` in Layouts, Pages, and Default files to tune what navigations are validated. In addition this change disables build time validation. There is a now undocumented way to get back to running build validation with * `experimental-error` * `experimental-manual-error` The build validation isn't ready for users because we need to overhaul the setup where you provide cookies and other sample values so we can run validation without a live session like we do in dev. To further support this the two remaining object properties that are also not ready for active use, `samples` and `from` are being updated to `unstable_samples` and `unstable_from` respectively. We will continue to iterate on build time validation but may remove these APIs or alter their semantics as we figure out a more ergonomic way to support this setup. In anticipation of multiple levels the object form of `instant` can be provided a level value `warning` or `experimental-error`. this latter option is similarly undocumented so documented behavior will only cover `warning` which is generally a synonym of true unless you are activating error by default
Author
Parents
Loading