@astrojs/vercel
πΏ Minor Changes
-
#13211
7ea0abaThanks @slawekkolodziej! - Adds support for regular expressions in ISR exclude listPreviously, excluding a page from ISR required explicitly listing it in
isr.exclude. As websites grew larger, maintaining this list became increasingly difficult, especially for multiple API routes and pages that needed server-side rendering.To address this, ISR exclusions now support regular expressions, allowing for more flexible and scalable configurations.
astro.config.mjs import vercel from '@astrojs/vercel/serverless';export default defineConfig({output: 'server',adapter: vercel({isr: {exclude: ['/preview', // Excludes a specific route (e.g., pages/preview.astro)'/auth/[page]', // Excludes a dynamic route (e.g., pages/auth/[page].astro)/^\/api\/.+/, // Excludes all routes starting with /api/],},}),});
π Patch Changes
-
#13323
80926faThanks @ematipico! - Updatesesbuildandviteto the latest to avoid false positives audits warnings caused byesbuild. -
Updated dependencies [
1e11f5e]:- @astrojs/internal-helpers@0.6.0
-
β¨ Major Changes
-
#11679
ea71b90Thanks @florian-lefebvre! - Adds stable support forastro:env -
#11770
cfa6a47Thanks @Princesseuh! - Removed support for the Squoosh image service. As the underlying librarylibsquooshis no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.
import { squooshImageService } from "astro/config";import { defineConfig } from "astro/config";export default defineConfig({image: {service: squooshImageService()}});If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: https://github.com/Princesseuh/astro-image-service-squoosh
π Patch Changes
-
πΏ Minor Changes
-
#11728
5ea02b1Thanks @matthewp! - Deprecates thefunctionPerRouteoptionThis 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,}),});
π Patch Changes
-
β¨ Major Changes
-
#11714
8a53517Thanks @matthewp! - Remove support for functionPerRouteThis change removes support for the
functionPerRouteoption 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
5ea02b1Thanks @matthewp! - Deprecates thefunctionPerRouteoptionThis 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,}),});
π Patch Changes
-
πΏ Minor Changes
- #11199
2bdca27Thanks @florian-lefebvre! - Adds support for experimentalastro:envreleased in Astro 4.10
- #11199
πΏ Minor Changes
- #10761
f0acd30Thanks @ematipico! - Implements the vercel skew protection
- #10761
π Patch Changes
-
#10756
c75ededdb401cfa55e1ad2682d5e95494f49604eThanks @Princesseuh! - Fixeswidthsanddensitiesnot working when using Vercelβs Image Optimization.Note that you still need to make sure that the widths youβre outputting are enabled in the
imageConfigproperty of the Vercel adapter in order for these properties to work.
-
π Patch Changes
- #10611
a9a3694a98060be9a33045bb0fcf92ccf1acff6fThanks @jacobdalamb! - Updates the supported version of Node.js
- #10611
π Patch Changes
- #10609
31590d44ef8b7c96a757e9b835144d57d767383cThanks @matthewp! - Move nft warnings behind verbose logging
- #10609
πΏ Minor Changes
- #10513
a573cc199a00d35410197ba4117c97764a984dc0Thanks @tk04! - Theisr.excludeconfiguration can now include routes with dynamic and spread parameters.export default defineConfig({adapter: vercel({isr: {exclude: ["/blog/[title]""/api/[...slug]",]}})})
- #10513
πΏ Minor Changes
- #10476
cfbaa8a767b8794c2dcd8e164672195378be396aThanks @lilnasy! - The special-case handling ofsrc/vercel-edge-middleware.jsfile is now deprecated. This file allowed you to access the edge runtimeβsRequestContextobject, and create the middlewarelocalsfrom its fields. However, this object includes only one field - thewaitUntil()function - which is now available directly asctx.locals.vercel.edge.waitUntil().
- #10476
π Patch Changes
- Updated dependencies [
1ea0a25b94125e4f6f2ac82b42f638e22d7bdffd]:- @astrojs/internal-helpers@0.3.0
- Updated dependencies [
π Patch Changes
- #10336
f2e60a96754ed1d86001fe4d5d3a0c0ef657408dThanks @FredKSchott! - Fixes an issue that was preventing the use ofsharpin some cases and causing a runtime error
- #10336
π Patch Changes
- #10231
ae2a10e1a768e31d243194694222932ffafb54ccThanks @mingjunlu! - Fixes an issue where functions were also created for prerendered routes withfunctionPerRouteenabled.
- #10231