diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 8cddc0be10..5dbf24f4a6 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -134,7 +134,10 @@ export interface VercelServerlessConfig { /** Whether to create the Vercel Edge middleware from an Astro middleware in your code base. */ edgeMiddleware?: boolean; - /** Whether to split builds into a separate function for each route. */ + /** + * Whether to split builds into a separate function for each route. + * @deprecated `functionPerRoute` is deprecated and will be removed in the next major release of the adapter. + */ functionPerRoute?: boolean; /** The maximum duration (in seconds) that Serverless Functions can run before timing out. See the [Vercel documentation](https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration) for the default and maximum limit for your account plan. */ @@ -286,6 +289,11 @@ export default function vercelServerless({ `\tMake sure to check your plan carefully to avoid incurring additional costs.\n` + `\tYou can set functionPerRoute: false to prevent surpassing the limit.\n`, ); + + logger.warn( + `\n` + + `\t\`functionPerRoute\` is deprecated and will be removed in a future version of the adapter.\n` + ); } setAdapter(