Major Changes
-
#11714
8a53517
Thanks @matthewp! - Remove support for functionPerRouteThis change removes support for the
functionPerRoute
option both in Astro and@astrojs/vercel
.This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important.
Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting.
Given this, the feature has been removed from Astro.
Minor Changes
-
#11728
5ea02b1
Thanks @matthewp! - Deprecates thefunctionPerRoute
optionThis option is now deprecated, and will be removed entirely in Astro v5.0. We suggest removing this option from your configuration as soon as you are able to:
import { defineConfig } from 'astro/config'; import vercel from '@astrojs/vercel/serverless'; export default defineConfig({ // ... output: 'server', adapter: vercel({ - functionPerRoute: true, }), });