@astrojs/vercel
πΏ Minor Changes
- #14946
95c40f7Thanks @ematipico! - Removes theexperimental.cspflag and replaces it with a new configuration optionsecurity.csp- (v6 upgrade guidance)
- #14946
π Patch Changes
-
#14570
c96711dThanks @matthewp! - Fix regression in 8.2.7: validate densities-based srcset widths against configured sizesWhen using
densitieswith the Vercel image adapter, calculated widths were not being validated against Vercelβs configured sizes list. This caused images to fail when using densities, as Vercel would reject the invalid widths.This fix ensures densities-calculated widths are mapped to valid configured sizes, matching the behavior already implemented for the
widthsprop.
-
π Patch Changes
- #14536
9261996Thanks @florian-lefebvre! - Fixes a bug that caused too many files to be bundled in SSR
- #14536
π Patch Changes
-
#14473
d9634d3Thanks @florian-lefebvre! - Fixes a bug that caused too many files to be bundled in SSR -
Updated dependencies [
b8ca69b]:- @astrojs/internal-helpers@0.7.4
-
π Patch Changes
- Updated dependencies [
1e2499e]:- @astrojs/internal-helpers@0.7.3
- Updated dependencies [
π Patch Changes
- Updated dependencies [
4d16de7]:- @astrojs/internal-helpers@0.7.2
- Updated dependencies [
π Patch Changes
- Updated dependencies [
0567fb7]:- @astrojs/internal-helpers@0.7.1
- Updated dependencies [
π Patch Changes
- Updated dependencies [
f4e8889]:- @astrojs/internal-helpers@0.7.0
- Updated dependencies [
π Patch Changes
- #14063
de5a253Thanks @RobbieTheWagner! - Allow settingdomainstoundefinedinimagesConfigso thatremotePatternscan be better utilized for images from a variety of domains.
- #14063
π Patch Changes
- #13972
db8f8beThanks @ematipico! - Fixes the internal implementation of the new featureexperimentalStaticHeaders, where dynamic routes were mapped to use always the same header.
- #13972
πΏ Minor Changes
-
#13965
95ece06Thanks @ematipico! - Adds support for the experimental static headers Astro feature.When the feature is enabled via option
experimentalStaticHeaders, and experimental Content Security Policy is enabled, the adapter will generateResponseheaders for static pages, which allows support for CSP directives that are not supported inside a<meta>tag (e.g.frame-ancestors).import { defineConfig } from 'astro/config';import vercel from '@astrojs/vercel';export default defineConfig({adapter: vercel({experimentalStaticHeaders: true,}),experimental: {cps: true,},});
π Patch Changes
-
#13917
e615216Thanks @ascorbic! - The responsive images feature introduced behind a flag in v5.0.0 is no longer experimental and is available for general use.The new responsive images feature in Astro automatically generates optimized images for different screen sizes and resolutions, and applies the correct attributes to ensure that images are displayed correctly on all devices.
Enable the
image.responsiveStylesoption in your Astro config. Then, set alayoutattribute on anyor component, or configure a default image.layout, for instantly responsive images with automatically generatedsrcsetandsizesattributes based on the imageβs dimensions and the layout type.Displaying images correctly on the web can be challenging, and is one of the most common performance issues seen in sites. This new feature simplifies the most challenging part of the process: serving your site visitor an image optimized for their viewing experience, and for your websiteβs performance.
For full details, see the updated Image guide.
The
experimental.responsiveImagesflag has been removed, and all experimental image configuration options have been renamed to their final names.If you were using the experimental responsive images feature, youβll need to update your configuration:
Remove the experimental flag
export default defineConfig({experimental: {responsiveImages: true,},});Update image configuration options
During the experimental phase, default styles were applied automatically to responsive images. Now, you need to explicitly set the
responsiveStylesoption totrueif you want these styles applied.export default defineConfig({image: {responsiveStyles: true,},});The experimental image configuration options have been renamed:
Before:
export default defineConfig({image: {experimentalLayout: 'constrained',experimentalObjectFit: 'cover',experimentalObjectPosition: 'center',experimentalBreakpoints: [640, 750, 828, 1080, 1280],experimentalDefaultStyles: true,},experimental: {responsiveImages: true,},});After:
export default defineConfig({image: {layout: 'constrained',objectFit: 'cover',objectPosition: 'center',breakpoints: [640, 750, 828, 1080, 1280],responsiveStyles: true, // This is now *false* by default},});Component usage remains the same
The
layout,fit, andpositionprops on<Image>and<Picture>components work exactly the same as before:<Imagesrc={myImage}alt="A responsive image"layout="constrained"fit="cover"position="center"/>If you werenβt using the experimental responsive images feature, no changes are required.
Please see the Image guide for more information on using responsive images in Astro.
-
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.0
-
π Patch Changes
- #13679
4a8f193Thanks @moonclavedev! - Handle SVG images correctly in build image service
- #13679
π Patch Changes
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
- #13591
π Patch Changes
- Updated dependencies [
042d1de]:- @astrojs/internal-helpers@0.6.1
- Updated dependencies [