next.js
410c6580 - Add static error when `unstable_instant` is used without `cacheComponents` (#90793)

Commit
1 day ago
Add static error when `unstable_instant` is used without `cacheComponents` (#90793) `unstable_instant` requires `cacheComponents` to function — without it, validation is entirely skipped and the config silently does nothing. This adds a compile-time error in the SWC transform that catches the misconfiguration early, matching the existing pattern used for segment configs like `revalidate` that are incompatible with `cacheComponents` (but inverted — `unstable_instant` requires it rather than being incompatible with it). The error points directly to the export in the user's source file.
Author
Parents
Loading