mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Closes: https://linear.app/vercel/issue/DOC-6221/nextjs-split-route-segments-files-in-preparation-for-instant
25 lines
653 B
Plaintext
25 lines
653 B
Plaintext
---
|
|
title: runtime
|
|
description: API reference for the runtime route segment config option.
|
|
---
|
|
|
|
The `runtime` option allows you to select the JavaScript runtime used for rendering your route.
|
|
|
|
```tsx filename="layout.tsx | page.tsx | route.ts" switcher
|
|
export const runtime = 'nodejs'
|
|
// 'nodejs' | 'edge'
|
|
```
|
|
|
|
```js filename="layout.js | page.js | route.js" switcher
|
|
export const runtime = 'nodejs'
|
|
// 'nodejs' | 'edge'
|
|
```
|
|
|
|
- **`'nodejs'`** (default)
|
|
- **`'edge'`**
|
|
|
|
> **Good to know**:
|
|
>
|
|
> - Using `runtime: 'edge'` is **not supported** for Cache Components.
|
|
> - This option cannot be used in [Proxy](/docs/app/api-reference/file-conventions/proxy).
|