mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Propagate edge runtime preferredRegion metadata into adapter outputs and add adapter-config coverage for an edge app route. ### Why? Adapters need access to preferred region metadata from edge outputs when generating provider-specific deployment output. ### How? Copy edge function regions into output.config.preferredRegion and assert the adapter build-complete output for a fixture route with preferredRegion set to cdg1. ### Verification - `pnpm --filter=next build` - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/production/adapter-config/adapter-config.test.ts` <!-- NEXT_JS_LLM_PR -->
8 lines
209 B
TypeScript
8 lines
209 B
TypeScript
export const runtime = 'edge'
|
|
export const preferredRegion = ['cdg1']
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export function GET(_request: Request) {
|
|
return new Response('Hello, world!', { status: 200 })
|
|
}
|