API โ€บ @builder.io/qwik-city/vite/vercel/edge

FUNCTION_DIRECTORY

FUNCTION_DIRECTORY = "_qwik-city-edge";

Edit this section

vercelEdgeAdapter

export declare function vercelEdgeAdapter(
  opts?: VercelEdgeAdapterOptions,
): any;

Parameter

Type

Description

opts

VercelEdgeAdapterOptions

(Optional)

any

Edit this section

VercelEdgeAdapterOptions

export interface VercelEdgeAdapterOptions extends ServerAdapterOptions

Extends: ServerAdapterOptions

Property

Modifiers

Type

Description

awsLambdaHandler?

string

(Optional) AWS Handler Value for when the edge function uses AWS Lambda syntax.

Required: No

environment?

{ [key: string]: string; }

(Optional) Specifies environment variables for the edge function.

Required: No

maxDuration?

number

(Optional) Specifies the maximum duration that the edge function can run.

Required: No

memory?

number

(Optional) Specifies the memory allocation for the edge function.

Required: No

outputConfig?

boolean

(Optional) Determines if the build should auto-generate the .vercel/output/config.json config.

Defaults to true.

regions?

string[]

(Optional) Specifies the regions in which the edge function should run.

Required: No

runtime?

string

(Optional) Specifies the runtime environment for the function, for example, Node.js, Deno, etc.

Required: No

shouldAddHelpers?

boolean

(Optional) Enables request and response helpers methods.

Required: No Default: false

shouldAddSourceMapSupport?

boolean

(Optional) Enables source map generation.

Required: No Default: false

staticPaths?

string[]

(Optional) Manually add pathnames that should be treated as static paths and not SSR. For example, when these pathnames are requested, their response should come from a static file, rather than a server-side rendered response.

target?

string

(Optional) Specifies the target platform for the deployment, such as Vercel, AWS, etc.

Required: No

vcConfigEntryPoint?

string

(Optional) The entrypoint property in the .vc-config.json file. Indicates the initial file where code will be executed for the Edge Function.

Defaults to entry.vercel-edge.js.

Edit this section