next.js
7aa61377 - Emit build error when `useCache` is enabled and Edge runtime is used (#75279)

Commit
333 days ago
Emit build error when `useCache` is enabled and Edge runtime is used (#75279) The `"use cache"` directive is not compatible with the Edge runtime. When the `experimental.useCache` flag is enabled, we now emit a build error for pages with `export const runtime = 'edge'`. This is analogous to using the `experimental.dynamicIO` flag. The other route segment configs that are forbidden when `dynamicIO` is enabled, are currently still allowed for `useCache`: - `dynamicParams` - `dynamic` - `fetchCache` - `revalidate`
Author
Parents
Loading