#60089c298aa5a Thanks @jasikpark! - Updated error message for missing widths prop to provide an example
#60089c298aa5a Thanks @jasikpark! - Allow passing undefined to TransformOptions, this is a types fix for users with exactOptionalTypes enabled in their tsconfig
#55849963c6e4d & #5842c4b0cb8bf Thanks @wulinsheng123 and @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.
You can control this location with the new build configuration option named assets.
This marks astro as a peerDependency of several packages that are already getting major version bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
#5842c4b0cb8bf Thanks @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.
You can control this location with the new build configuration option named assets.
This marks astro as a peerDependency of several packages that are already getting major version bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
#55849963c6e4d Thanks @wulinsheng123! - Builds chunks into the assets folder. This simplifies configuring immutable caching with your adapter provider as all files are now in the same assets folder.
#5180b77200f42 Thanks @tony-sull! - Removes the content-visibility: auto styling added by the <Picture /> and <Image /> components.
Why: The content-visibility style is rarely needed for an <img> and can actually break certain layouts.
Migration: Do images in your layout actually depend on content-visibility? No problem! You can add these styles where needed in your own component styles.
#5038ed2dfdae5 Thanks @emmanuelchucks! - HTML attributes included on the <Picture /> component are now passed down to the underlying <img /> element.
Why?
when styling a <picture> the class and style attributes belong on the <img> itself
<picture> elements should not actually provide any aria- attributes
width and height can be added to the <img> to help prevent layout shift
The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for server (the server code for SSR), client (your client-side JavaScript and assets), and serverEntry (the name of the entrypoint server module). Here are the defaults:
import { defineConfig } from'astro/config';
exportdefaultdefineConfig({
output: 'server',
build: {
server: './dist/server/',
client: './dist/client/',
serverEntry: 'entry.mjs',
},
});
These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).
The integration hook astro:build:start includes a param buildConfig which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new build.config options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: