mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Before: ``` Error: `export const config` in /vercel/path0/src/app/api/route.js is deprecated. Please change `runtime` property to segment export config. See https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config ``` After: ``` Error: `export const config` in /vercel/path0/src/app/api/route.js is deprecated: - Change `config.runtimeā¦` to `export const runtime = "edge"` - Change `config.regionsā¦` to `export const preferredRegion = ["us-east-1"]` Visit https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config for more information. ``` The values proposed in Change.. are the actual ones from the customers, they can just copy paste. Closes NEXT-1560
14 lines
217 B
JavaScript
14 lines
217 B
JavaScript
/*global globalThis*/
|
|
|
|
export default function Page() {
|
|
if ('EdgeRuntime' in globalThis) {
|
|
return <p>Edge!</p>
|
|
}
|
|
return <p>Node!</p>
|
|
}
|
|
|
|
export const config = {
|
|
runtime: 'edge',
|
|
regions: ['us-east-1'],
|
|
}
|