API โบ @builder.io/qwik-city/vite/vercel/serverless
FUNCTION_DIRECTORY
FUNCTION_DIRECTORY = "_qwik-city-serverless";ServerlessFunctionConfig
export interface ServerlessFunctionConfigProperty
Modifiers
Type
Description
Record<string, string>[]
(Optional) Map of additional environment variables that will be available to the Serverless Function, in addition to the env vars specified in the Project Settings.
Required: No
string
Indicates the initial file where code will be executed for the Serverless Function.
Required: Yes
number
(Optional) Maximum duration (in seconds) that will be allowed for the Serverless Function.
Required: No
number
(Optional) Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
Required: No
string[]
(Optional) List of Vercel Regions where the Serverless Function will be deployed to.
Required: No
string
Specifies which "runtime" will be used to execute the Serverless Function.
Required: Yes
boolean
(Optional) When true, the Serverless Function will stream the response to the client.
Required: No
boolean
(Optional) True if a custom runtime has support for Lambda runtime wrappers.
Required: No
vercelServerlessAdapter
export declare function vercelServerlessAdapter(
opts?: VercelServerlessAdapterOptions,
): any;Parameter
Type
Description
opts
VercelServerlessAdapterOptions
(Optional)
any
VercelServerlessAdapterOptions
export interface VercelServerlessAdapterOptions extends ServerAdapterOptionsExtends: ServerAdapterOptions
Property
Modifiers
Type
Description
string
(Optional) AWS Handler Value for when the serverless function uses AWS Lambda syntax.
Required: No
{ [key: string]: string; }
(Optional) Specifies environment variables for the serverless function.
Required: No
number
(Optional) Specifies the maximum duration that the serverless function can run.
Required: No
number
(Optional) Specifies the memory allocation for the serverless function.
Required: No
boolean
(Optional) Determines if the build should auto-generate the .vercel/output/config.json config.
Defaults to true.
string[]
(Optional) Specifies the regions in which the serverless function should run.
Required: No
string
(Optional) Specifies the runtime environment for the function, for example, Node.js, Deno, etc.
Required: No
boolean
(Optional) Enables request and response helpers methods.
Required: No Default: false
boolean
(Optional) Enables source map generation.
Required: No Default: false
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.
string
(Optional) Specifies the target platform for the deployment, such as Vercel, AWS, etc.
Required: No
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.