Unverified Commit a7d15733 authored by Josh Story's avatar Josh Story Committed by GitHub

Support more prefetch configuration options (#92859)

"auto" mode is the default. It does not need to be explicitly exported
"force-" modes suggest overriding framework heuristics "force-disabled"
disables prefetching for this segment "force-static" forces any
prefetching of this segment to be static "force-runtime" forces any
prefetching of this segment to do runtime prefetching

It's worth noting that when runtime prefetching we fetch the necessary
segment and all child segments in a single request. This means that a
deeper segment might specify disabled or static and still get
conditionally rendered as a runtime prefetch. This was already the
behavior of runtime prefetching and not changing in this PR just
something to call out since it may be confusing to folks trying to
understand how the implementation of prefetching actually work
parent 430588c2
---
title: prefetch
description: API reference for the prefetch route segment config.
version: draft
related:
title: Next Steps
description: Learn how to use instant navigations in practice.
links:
- app/guides/instant-navigation
- app/api-reference/file-conventions/route-segment-config/instant
---
The `unstable_prefetch` route segment config controls how a segment is prefetched during client-side navigation. By default (`'auto'`), the framework decides based on the segment's instant validation configuration and caching structure. The `force-` options let you declare a specific behavior. Use the force options with care since they can have implications for the speed of navigation and cost of naviagation. If you are configuring prefetching using this export consider pairing it with `unstable_instant` to validate that navigations to this Segment will in fact produce an instant UI with the prefetched data. This is especially important with runtime prefetching.
> **Good to know**:
>
> - The `unstable_prefetch` export only works when [`cacheComponents`](/docs/app/api-reference/config/next-config-js/cacheComponents) is enabled.
> - `unstable_prefetch` cannot be used when your Segment is a Client Component.
```tsx filename="layout.tsx | page.tsx" switcher
export const unstable_prefetch = 'force-runtime'
export default function Page() {
return <div>...</div>
}
```
```jsx filename="layout.js | page.js" switcher
export const unstable_prefetch = 'force-runtime'
export default function Page() {
return <div>...</div>
}
```
## Options
### `'auto'` (default)
The framework decides how to prefetch this segment. Segments with instant validation enabled are prefetched statically. Segments without instant validation may not be prefetched at all. You do not need to set this explicitly. While this option is available for completeness it is generally not expected that you use it and insteaed expect that you just omit the export from this segment.
### `'force-runtime'`
Always prefetch this segment at runtime. The server renders a fresh response for the segment during prefetch, allowing runtime data like cookies, headers, and search params to be included. This is useful for personalized content that should still be available instantly on navigation.
When using `'force-runtime'`, you should also configure [`unstable_instant`](/docs/app/api-reference/file-conventions/route-segment-config/instant) with `samples` so that instant validation can verify your caching structure against realistic request data.
> **Good to know**: When a segment uses runtime prefetching, all downstream segments are included in the same runtime prefetch request. This means segments deeper in the tree that are configured with `'force-static'` or `'force-disabled'` will still be prefetched as part of the runtime response.
```tsx filename="page.tsx"
export const unstable_prefetch = 'force-runtime'
export const unstable_instant = {
samples: [
{
cookies: [{ name: 'session', value: 'test' }],
},
],
}
```
### `'force-static'`
Always prefetch this segment statically, even if it has not been validated with `unstable_instant`. Use this when you know the segment produces a valid static shell but do not want to set up instant validation.
### `'force-disabled'`
Never prefetch this segment. The client will not request segment data ahead of navigation. Use this for segments where prefetching would be wasteful, for example pages behind authentication that are rarely visited.
> **Good to know**: `'force-disabled'` does not prevent Next.js from prefetching metadata about the route. However, the actual segment data for this segment and all deeper segments will be omitted from prefetching.
## Relationship with the `<Link prefetch>` prop
The `unstable_prefetch` segment config and the [`<Link prefetch>` prop](/docs/app/api-reference/components/link#prefetch) control different aspects of prefetching:
- The **segment config** informs Next.js about a segment's caching characteristics — whether its data can be prefetched statically, requires a runtime prefetch with the user's session, or should be skipped entirely. This applies to the segment regardless of which link points to it.
- The **`<Link prefetch>` prop** reflects the anticipated intent of a specific link on a specific page. A link that users rarely click can be deprioritized with `prefetch={false}`, independent of how the destination segments are configured.
In general, both of these are special circumstances. The default behavior — where Next.js decides what to prefetch based on [`unstable_instant`](/docs/app/api-reference/file-conventions/route-segment-config/instant) validation and the segment's caching structure — is optimized to provide a good navigation experience without manual configuration.
## TypeScript
```tsx
type Prefetch = 'auto' | 'force-disabled' | 'force-static' | 'force-runtime'
export const unstable_prefetch: Prefetch = 'force-runtime'
```
## Version History
| Version | Changes |
| --------- | ------------------------------------------------------------- |
| `v16.x.x` | `unstable_prefetch` export introduced (Cache Components only) |
...@@ -49,11 +49,20 @@ const InstantConfigSchema = z.union([ ...@@ -49,11 +49,20 @@ const InstantConfigSchema = z.union([
z.literal(false), z.literal(false),
]) ])
const PrefetchSchema = z.enum(['static', 'runtime']) const PrefetchSchema = z.enum([
'auto',
'force-disabled',
'force-static',
'force-runtime',
])
export type Instant = InstantConfigStatic | InstantConfigRuntime | false export type Instant = InstantConfigStatic | InstantConfigRuntime | false
export type Prefetch = 'static' | 'runtime' export type Prefetch =
| 'auto'
| 'force-disabled'
| 'force-static'
| 'force-runtime'
export type InstantConfigForTypeCheckInternal = __GenericInstantConfig | Instant export type InstantConfigForTypeCheckInternal = __GenericInstantConfig | Instant
// the __GenericPrefetch type is used to avoid type widening issues with // the __GenericPrefetch type is used to avoid type widening issues with
...@@ -208,7 +217,7 @@ export function parseAppSegmentConfig( ...@@ -208,7 +217,7 @@ export function parseAppSegmentConfig(
} }
case 'unstable_prefetch': { case 'unstable_prefetch': {
return { return {
message: `Invalid unstable_prefetch value ${JSON.stringify(ctx.data)} on "${route}", must be "static" or "runtime".`, message: `Invalid unstable_prefetch value ${JSON.stringify(ctx.data)} on "${route}", must be "auto", "force-disabled", "force-static", or "force-runtime".`,
} }
} }
case 'unstable_dynamicStaleTime': { case 'unstable_dynamicStaleTime': {
......
...@@ -246,7 +246,7 @@ async function createComponentTreeInternal( ...@@ -246,7 +246,7 @@ async function createComponentTreeInternal(
const prefetchConfig = layoutOrPageMod const prefetchConfig = layoutOrPageMod
? (layoutOrPageMod as AppSegmentConfig).unstable_prefetch ? (layoutOrPageMod as AppSegmentConfig).unstable_prefetch
: undefined : undefined
const hasRuntimePrefetch = prefetchConfig === 'runtime' const hasRuntimePrefetch = prefetchConfig === 'force-runtime'
const isRuntimePrefetchable = hasRuntimePrefetch || parentRuntimePrefetchable const isRuntimePrefetchable = hasRuntimePrefetch || parentRuntimePrefetchable
const [Forbidden, forbiddenStyles] = const [Forbidden, forbiddenStyles] =
......
...@@ -88,13 +88,13 @@ async function createFlightRouterStateFromLoaderTreeImpl( ...@@ -88,13 +88,13 @@ async function createFlightRouterStateFromLoaderTreeImpl(
prefetchHints |= PrefetchHint.IsRootLayout prefetchHints |= PrefetchHint.IsRootLayout
} }
if (instantConfig === false) { if (instantConfig && typeof instantConfig === 'object') {
prefetchHints |= PrefetchHint.PrefetchDisabled
} else if (instantConfig && typeof instantConfig === 'object') {
prefetchHints |= PrefetchHint.SubtreeHasInstant prefetchHints |= PrefetchHint.SubtreeHasInstant
} }
if (prefetchConfig === 'runtime') { if (prefetchConfig === 'force-disabled') {
prefetchHints |= PrefetchHint.PrefetchDisabled
} else if (prefetchConfig === 'force-runtime') {
prefetchHints |= PrefetchHint.HasRuntimePrefetch prefetchHints |= PrefetchHint.HasRuntimePrefetch
} }
......
...@@ -19,7 +19,7 @@ export async function anySegmentHasRuntimePrefetchEnabled( ...@@ -19,7 +19,7 @@ export async function anySegmentHasRuntimePrefetchEnabled(
const prefetchConfig = layoutOrPageMod const prefetchConfig = layoutOrPageMod
? (layoutOrPageMod as AppSegmentConfig).unstable_prefetch ? (layoutOrPageMod as AppSegmentConfig).unstable_prefetch
: undefined : undefined
if (prefetchConfig === 'runtime') { if (prefetchConfig === 'force-runtime') {
return true return true
} }
......
...@@ -1163,7 +1163,7 @@ export async function createCombinedPayloadAtDepth( ...@@ -1163,7 +1163,7 @@ export async function createCombinedPayloadAtDepth(
} }
} }
const segmentHasRuntimePrefetch = prefetchConfig === 'runtime' const segmentHasRuntimePrefetch = prefetchConfig === 'force-runtime'
let childIsInsideRuntimePrefetch = isInsideRuntimePrefetch let childIsInsideRuntimePrefetch = isInsideRuntimePrefetch
let stage: SegmentStage let stage: SegmentStage
......
...@@ -156,6 +156,18 @@ const API_DOCS: Record< ...@@ -156,6 +156,18 @@ const API_DOCS: Record<
// `getSemanticDiagnosticsForExportVariableStatement` below, and only provide hover a tooltip + autocomplete. // `getSemanticDiagnosticsForExportVariableStatement` below, and only provide hover a tooltip + autocomplete.
insertText: 'unstable_instant = { prefetch: "static" };', insertText: 'unstable_instant = { prefetch: "static" };',
}, },
unstable_prefetch: {
description: `Controls prefetching behavior for this segment. This configuration is currently under development and will change.`,
link: '(docs coming soon)',
type: `"auto" | "force-disabled" | "force-static" | "force-runtime"`,
options: {
auto: 'Default. Framework decides based on instant validation and segment configuration. You do not need to set this explicitly.',
'force-disabled': 'Never prefetch this segment.',
'force-static': 'Always prefetch this segment statically.',
'force-runtime': 'Always prefetch this segment at runtime.',
},
insertText: `unstable_prefetch = 'force-runtime';`,
},
unstable_dynamicStaleTime: { unstable_dynamicStaleTime: {
description: `Controls how long the client-side router cache retains dynamic page data (in seconds). Pages only — not allowed in layouts. Cannot be combined with \`unstable_instant\`.`, description: `Controls how long the client-side router cache retains dynamic page data (in seconds). Pages only — not allowed in layouts. Cannot be combined with \`unstable_instant\`.`,
link: '(docs coming soon)', link: '(docs coming soon)',
......
...@@ -4,7 +4,7 @@ import { connection } from 'next/server' ...@@ -4,7 +4,7 @@ import { connection } from 'next/server'
import { Suspense } from 'react' import { Suspense } from 'react'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = __dirname + '/__PAGE__' const CACHE_KEY = __dirname + '/__PAGE__'
......
...@@ -3,7 +3,7 @@ import { UncachedFetch, CachedData } from '../data-fetching' ...@@ -3,7 +3,7 @@ import { UncachedFetch, CachedData } from '../data-fetching'
import { PrivateCachedData } from './data-fetching' import { PrivateCachedData } from './data-fetching'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = '/private-cache/__LAYOUT__' const CACHE_KEY = '/private-cache/__LAYOUT__'
......
...@@ -3,7 +3,7 @@ import { UncachedFetch, CachedData } from '../data-fetching' ...@@ -3,7 +3,7 @@ import { UncachedFetch, CachedData } from '../data-fetching'
import { ShortLivedCache } from './data-fetching' import { ShortLivedCache } from './data-fetching'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = __dirname + '/__LAYOUT__' const CACHE_KEY = __dirname + '/__LAYOUT__'
......
...@@ -2,7 +2,7 @@ import { Suspense } from 'react' ...@@ -2,7 +2,7 @@ import { Suspense } from 'react'
import { UncachedFetch, CachedFetch, CachedData } from '../data-fetching' import { UncachedFetch, CachedFetch, CachedData } from '../data-fetching'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = __dirname + '/__LAYOUT__' const CACHE_KEY = __dirname + '/__LAYOUT__'
......
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -3,7 +3,7 @@ import { CachedData, getCachedData } from '../../data-fetching' ...@@ -3,7 +3,7 @@ import { CachedData, getCachedData } from '../../data-fetching'
import { cookies } from 'next/headers' import { cookies } from 'next/headers'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = __dirname + '/__PAGE__' const CACHE_KEY = __dirname + '/__PAGE__'
......
import { CachedData, getCachedData } from '../../data-fetching' import { CachedData, getCachedData } from '../../data-fetching'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
const CACHE_KEY = __dirname + '/__PAGE__' const CACHE_KEY = __dirname + '/__PAGE__'
......
...@@ -2,7 +2,7 @@ import { Suspense } from 'react' ...@@ -2,7 +2,7 @@ import { Suspense } from 'react'
import { Static, Runtime, Dynamic } from '../shared' import { Static, Runtime, Dynamic } from '../shared'
export const unstable_instant = { prefetch: 'runtime', samples: [{}] } export const unstable_instant = { prefetch: 'runtime', samples: [{}] }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Root({ children }: { children: React.ReactNode }) { export default function Root({ children }: { children: React.ReactNode }) {
return ( return (
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ searchParams: { myParam: 'testValue' } }], samples: [{ searchParams: { myParam: 'testValue' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
type SearchParams = { [key: string]: string | string[] | undefined } type SearchParams = { [key: string]: string | string[] | undefined }
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -15,7 +15,7 @@ export const unstable_instant: Instant = { ...@@ -15,7 +15,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -16,7 +16,7 @@ export const unstable_instant: Instant = { ...@@ -16,7 +16,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export function generateStaticParams() { export function generateStaticParams() {
return [{ slug: 'foo' }, { slug: 'bar' }] return [{ slug: 'foo' }, { slug: 'bar' }]
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ headers: [] }], samples: [{ headers: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ headers: [] }], samples: [{ headers: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ headers: [] }], samples: [{ headers: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -15,7 +15,7 @@ export const unstable_instant: Instant = { ...@@ -15,7 +15,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'auth', value: '1' }] }], samples: [{ cookies: [{ name: 'auth', value: '1' }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
const c = await cookies() const c = await cookies()
......
...@@ -13,7 +13,7 @@ export const unstable_instant: Instant = { ...@@ -13,7 +13,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -13,7 +13,7 @@ export const unstable_instant: Instant = { ...@@ -13,7 +13,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = { ...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -5,7 +5,7 @@ export const unstable_instant: Instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant: Instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ params: { slug: 'hello' } }], samples: [{ params: { slug: 'hello' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -5,7 +5,7 @@ export const unstable_instant: Instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant: Instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ params: { slug: 'hello' } }], samples: [{ params: { slug: 'hello' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ searchParams: { q: 'test' } }], samples: [{ searchParams: { q: 'test' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ searchParams: { q: 'test' } }], samples: [{ searchParams: { q: 'test' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = { ...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -11,7 +11,7 @@ export const unstable_instant: Instant = { ...@@ -11,7 +11,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -16,7 +16,7 @@ export const unstable_instant: Instant = { ...@@ -16,7 +16,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
type SearchParams = Record<string, string | string[]> type SearchParams = Record<string, string | string[]>
......
...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = { ...@@ -12,7 +12,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -14,7 +14,7 @@ export const unstable_instant: Instant = { ...@@ -14,7 +14,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -14,7 +14,7 @@ export const unstable_instant: Instant = { ...@@ -14,7 +14,7 @@ export const unstable_instant: Instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await cachedIO('static') await cachedIO('static')
......
...@@ -2,7 +2,7 @@ export const unstable_instant = { ...@@ -2,7 +2,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await privateCachedIO() await privateCachedIO()
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await cookies() await cookies()
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'auth', value: '1' }] }], samples: [{ cookies: [{ name: 'auth', value: '1' }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -8,7 +8,7 @@ export const unstable_instant: Instant = { ...@@ -8,7 +8,7 @@ export const unstable_instant: Instant = {
// no samples // no samples
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
// Guard behind cookies() so that the rest of this component only runs during validation // Guard behind cookies() so that the rest of this component only runs during validation
......
...@@ -8,7 +8,7 @@ export const unstable_instant: Instant = { ...@@ -8,7 +8,7 @@ export const unstable_instant: Instant = {
// no samples // no samples
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
// Guard behind cookies() so that the rest of this component only runs during validation // Guard behind cookies() so that the rest of this component only runs during validation
......
...@@ -7,7 +7,7 @@ export const unstable_instant: Instant = { ...@@ -7,7 +7,7 @@ export const unstable_instant: Instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ params: { lang: 'en-from-samples' } }], samples: [{ params: { lang: 'en-from-samples' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
// Guard behind cookies() so that the rest of this component only runs during validation // Guard behind cookies() so that the rest of this component only runs during validation
......
...@@ -3,7 +3,7 @@ export const unstable_instant = { ...@@ -3,7 +3,7 @@ export const unstable_instant = {
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
unstable_disableValidation: true, unstable_disableValidation: true,
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Layout({ children }) { export default function Layout({ children }) {
return <>{children}</> return <>{children}</>
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
unstable_disableValidation: true, unstable_disableValidation: true,
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await connection() await connection()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
unstable_disableValidation: true, unstable_disableValidation: true,
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await connection() await connection()
......
...@@ -7,7 +7,7 @@ export const unstable_instant = { ...@@ -7,7 +7,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
// Note that we're inside a root layout with suspense, so we skip the static shell // Note that we're inside a root layout with suspense, so we skip the static shell
export async function generateViewport(): Promise<Viewport> { export async function generateViewport(): Promise<Viewport> {
......
...@@ -2,7 +2,7 @@ export const unstable_instant = { ...@@ -2,7 +2,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Layout({ children }) { export default async function Layout({ children }) {
return <>{children}</> return <>{children}</>
......
...@@ -7,7 +7,7 @@ export const unstable_instant = { ...@@ -7,7 +7,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export async function generateMetadata(): Promise<Metadata> { export async function generateMetadata(): Promise<Metadata> {
await connection() await connection()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export async function generateViewport(): Promise<Viewport> { export async function generateViewport(): Promise<Viewport> {
await cookies() await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{}], samples: [{}],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function SlotPage() { export default function SlotPage() {
return ( return (
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function RuntimeLayout({ children }) { export default async function RuntimeLayout({ children }) {
await cookies() await cookies()
......
// Avoid static shell validation -- we only want to test the validation of `prefetch: 'runtime'` here. // Avoid static shell validation -- we only want to test the validation of `prefetch: 'runtime'` here.
export const unstable_instant = false export const unstable_instant = false
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function DisableStaticShell({ children }) { export default function DisableStaticShell({ children }) {
return <>{children}</> return <>{children}</>
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
// This page HAS runtime prefetch enabled. cookies() is passed as a promise // This page HAS runtime prefetch enabled. cookies() is passed as a promise
// input to a public "use cache" function. The cache doesn't read the cookies // input to a public "use cache" function. The cache doesn't read the cookies
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export async function generateMetadata() { export async function generateMetadata() {
await cookies() await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
async function Runtime() { async function Runtime() {
await cookies() await cookies()
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
// This page HAS runtime prefetch enabled. The sync IO (Date.now()) after // This page HAS runtime prefetch enabled. The sync IO (Date.now()) after
// cookies() is invalid here because during a runtime prefetch, cookies() // cookies() is invalid here because during a runtime prefetch, cookies()
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await cookies() await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Layout({ children }: { children: ReactNode }) { export default async function Layout({ children }: { children: ReactNode }) {
await connection() await connection()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await cookies() await cookies()
......
...@@ -7,7 +7,7 @@ export const unstable_instant = { ...@@ -7,7 +7,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function InnerLayout({ children }: { children: ReactNode }) { export default function InnerLayout({ children }: { children: ReactNode }) {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
await cookies() await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function RuntimeLayout({ children }) { export default async function RuntimeLayout({ children }) {
await cookies() await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [], params: { param: '123' } }], samples: [{ cookies: [], params: { param: '123' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
params, params,
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [], searchParams: { foo: 'bar' } }], samples: [{ cookies: [], searchParams: { foo: 'bar' } }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
async function Runtime() { async function Runtime() {
await cookies() await cookies()
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'test', value: null }] }], samples: [{ cookies: [{ name: 'test', value: null }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Layout({ children }: { children: ReactNode }) { export default function Layout({ children }: { children: ReactNode }) {
return <div>{children}</div> return <div>{children}</div>
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'test', value: null }] }], samples: [{ cookies: [{ name: 'test', value: null }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -14,7 +14,7 @@ export const unstable_instant = { ...@@ -14,7 +14,7 @@ export const unstable_instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
...@@ -15,7 +15,7 @@ export const unstable_instant = { ...@@ -15,7 +15,7 @@ export const unstable_instant = {
}, },
], ],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
async function LayoutContent({ children }: { children: ReactNode }) { async function LayoutContent({ children }: { children: ReactNode }) {
const cookieStore = await cookies() const cookieStore = await cookies()
......
// This layout has prefetching disabled (unstable_instant = false) because it // This layout has prefetching disabled because it performs uncached dynamic
// performs uncached dynamic I/O (connection()). Static parents above it should // I/O (connection()). Static parents above it should be able to inline through
// be able to inline through it and into the static child below, because this // it and into the static child below, because this layout acts as a transparent
// layout acts as a transparent pass-through — its slot in the bundle is null // pass-through — its slot in the bundle is null but the chain isn't broken.
// but the chain isn't broken.
import { ReactNode, Suspense } from 'react' import { ReactNode, Suspense } from 'react'
import { connection } from 'next/server' import { connection } from 'next/server'
export const unstable_instant = false export const unstable_instant = false
export const unstable_prefetch = 'force-disabled'
async function DynamicContent() { async function DynamicContent() {
await connection() await connection()
......
...@@ -2,6 +2,7 @@ import { ReactNode } from 'react' ...@@ -2,6 +2,7 @@ import { ReactNode } from 'react'
import { connection } from 'next/server' import { connection } from 'next/server'
export const unstable_instant = false export const unstable_instant = false
export const unstable_prefetch = 'force-disabled'
export default async function Layout({ children }: { children: ReactNode }) { export default async function Layout({ children }: { children: ReactNode }) {
await connection() await connection()
......
...@@ -4,7 +4,7 @@ export const unstable_instant = { ...@@ -4,7 +4,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'theme', value: 'default' }] }], samples: [{ cookies: [{ name: 'theme', value: 'default' }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function RuntimeBailoutPage() { export default async function RuntimeBailoutPage() {
const cookieStore = await cookies() const cookieStore = await cookies()
......
...@@ -9,7 +9,7 @@ export const unstable_instant = { ...@@ -9,7 +9,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'theme', value: 'default' }] }], samples: [{ cookies: [{ name: 'theme', value: 'default' }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
async function DynamicContent() { async function DynamicContent() {
const cookieStore = await cookies() const cookieStore = await cookies()
......
...@@ -9,7 +9,7 @@ export const unstable_instant = { ...@@ -9,7 +9,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [{ name: 'theme', value: 'default' }] }], samples: [{ cookies: [{ name: 'theme', value: 'default' }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
async function DynamicContent() { async function DynamicContent() {
const cookieStore = await cookies() const cookieStore = await cookies()
......
...@@ -5,7 +5,7 @@ export const unstable_instant = { ...@@ -5,7 +5,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default function Page() { export default function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Layout({ children }) { export default async function Layout({ children }) {
return ( return (
<main> <main>
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -6,7 +6,7 @@ export const unstable_instant = { ...@@ -6,7 +6,7 @@ export const unstable_instant = {
prefetch: 'runtime', prefetch: 'runtime',
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [{ name: 'user-agent', value: null }] }], samples: [{ cookies: [{ name: 'user-agent', value: null }] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -9,7 +9,7 @@ export const unstable_instant = { ...@@ -9,7 +9,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ params }: { params: Promise<Params> }) { export default async function Page({ params }: { params: Promise<Params> }) {
return ( return (
......
...@@ -9,7 +9,7 @@ export const unstable_instant = { ...@@ -9,7 +9,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -8,7 +8,7 @@ export const unstable_instant = { ...@@ -8,7 +8,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -9,7 +9,7 @@ export const unstable_instant = { ...@@ -9,7 +9,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page() { export default async function Page() {
return ( return (
......
...@@ -10,7 +10,7 @@ export const unstable_instant = { ...@@ -10,7 +10,7 @@ export const unstable_instant = {
unstable_disableValidation: true, unstable_disableValidation: true,
samples: [{ cookies: [] }], samples: [{ cookies: [] }],
} }
export const unstable_prefetch = 'runtime' export const unstable_prefetch = 'force-runtime'
export default async function Page({ export default async function Page({
searchParams, searchParams,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment