runtime
The runtime option allows you to select the JavaScript runtime used for rendering your route.
layout.tsx | page.tsx | route.ts
export const runtime = 'nodejs'
// 'nodejs'layout.js | page.js | route.js
export const runtime = 'nodejs'
// 'nodejs''nodejs'(default)'edge'(deprecated)
Good to know:
- The Edge Runtime is deprecated. Remove the
runtimeexport from your route files. See Edge Runtime Deprecated.- When Cache Components is enabled, remove the
runtimeexport, includingruntime = 'nodejs'. Cache Components uses the default Node.js runtime and does not support theruntimeroute segment config. See Migrating to Cache Components.- This option cannot be used in Proxy.