mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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`
6 lines
125 B
TypeScript
6 lines
125 B
TypeScript
export const runtime = 'edge'
|
|
|
|
export default function Page() {
|
|
return <div>This page uses `export const runtime`.</div>
|
|
}
|