mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Deprecate the functionPerRoute option (#11728)
* Deprecate the functionPerRoute option * Update .changeset/weak-dancers-beam.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
parent
4103925828
commit
8d7350d3fa
1 changed files with 9 additions and 1 deletions
|
@ -134,7 +134,10 @@ export interface VercelServerlessConfig {
|
||||||
/** Whether to create the Vercel Edge middleware from an Astro middleware in your code base. */
|
/** Whether to create the Vercel Edge middleware from an Astro middleware in your code base. */
|
||||||
edgeMiddleware?: boolean;
|
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;
|
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. */
|
/** 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` +
|
`\tMake sure to check your plan carefully to avoid incurring additional costs.\n` +
|
||||||
`\tYou can set functionPerRoute: false to prevent surpassing the limit.\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(
|
setAdapter(
|
||||||
|
|
Loading…
Add table
Reference in a new issue