diff --git a/src/presets/vercel.ts b/src/presets/vercel.ts index 6b836b89ce..1ff5e23de4 100644 --- a/src/presets/vercel.ts +++ b/src/presets/vercel.ts @@ -107,6 +107,7 @@ export const vercelEdge = defineNitroPreset({ const functionConfig = { runtime: "edge", entrypoint: "index.mjs", + regions: nitro.options.vercel?.regions, }; await writeFile( functionConfigPath, diff --git a/src/types/presets.ts b/src/types/presets.ts index a7106c9adb..96a1d117a5 100644 --- a/src/types/presets.ts +++ b/src/types/presets.ts @@ -55,6 +55,11 @@ export interface VercelBuildConfigV3 { export interface PresetOptions { vercel: { config: VercelBuildConfigV3; + /** + * If you are using `vercel-edge`, you can specify the region(s) for your edge function. + * @see https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions + */ + regions?: string[]; functions?: { memory: number; maxDuration: number;