Route Segment Config
The Route Segment Config options allow you to configure the behavior of a Page, Layout, or Route Handler by directly exporting the following variables:
| Option | Type | Default |
|---|---|---|
dynamicParams | boolean | true |
runtime | 'nodejs' | 'edge' (deprecated) | 'nodejs' |
preferredRegion | 'auto' | 'global' | 'home' | string | string[] (deprecated) | 'auto' |
maxDuration | number | Set by deployment platform |
With Cache Components enabled, pages and layouts also support the following option:
| Option | Type | Default |
|---|---|---|
ensureStatic | 'auto' | 'shell' | 'prefetch' | 'navigation' | false | 'auto' |
Version History
| Version | |
|---|---|
v16.0.0 | dynamic, dynamicParams, revalidate, and fetchCache removed when Cache Components is enabled. See Caching and Revalidating (Previous Model). |
v16.0.0 | export const experimental_ppr = true removed. A codemod is available. |
v15.0.0-RC | export const runtime = "experimental-edge" deprecated. A codemod is available. |
dynamicParams
API reference for the dynamicParams route segment config option.
ensureStatic
Require selected route output to remain static instead of rendering per request with the ensureStatic route segment config.
instant
Configure instant navigation validation for a route segment.
maxDuration
API reference for the maxDuration route segment config option.
preferredRegion (deprecated)
API reference for the preferredRegion route segment config option.
prefetch config
Configure how a route segment is prefetched during client navigation.
runtime
API reference for the runtime route segment config option.
Last updated