unstale

npm / astro

astro

What changed in astro 5 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

235 breaking57 security32 deprecations145 new APIs and options26 performance48 behavior and defaults18 tooling504 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

astro 7433 changes

Breaking changes 62

  • Validates forwarded protocol, host, and port together against each entry; rejects non-HTTP(S) protocols and non-plain hostnames, and applies the validated host to Astro.url exactly as matched.

    7.4.11release notes

  • Exits with code 1 when @astrojs/check or typescript is missing, so CI does not silently skip type checking.

    7.4.6release notes

  • Requests with invalid percent-encoding now return a 400 instead of being logged as an encoding error and routed with the undecoded path.

    7.4.5release notes

  • Rendering is stricter and consistent across .astro dynamic tags, JSX, and MDX; invalid leading names now throw, and characters such as / or = cannot change generated markup.

    7.4.5release notessecurity advisory

  • Cached empty 404 or 500 responses now render their error page on every request instead of serving an empty body.

    7.4.3release notes

  • The minimum supported Node.js version is raised to 22.23.4 to include fixes from the October 2026 Node.js security releases.

    7.4.2release notes

  • The glob loader no longer swallows rendering errors during content sync, so astro build fails when remark or rehype plugins throw.

    7.4.0release notes

  • Rendering errors during content sync now cause astro build to fail instead of being swallowed and returning exit code 0.

    7.4.0release notes

  • The minimum supported Node.js version is now 22.22.0.

    7.4.0release notesdocs

  • Prerender errors now fail the build instead of being silently written as empty HTML files.

    7.4.0release notes

  • Malformed JSON action requests now return 400, while malformed percent-encoded action names return 404.

    7.3.6release notes

  • Composable handlers now reject over-encoded request paths with 400 Bad Request, matching astro().

    7.3.6release notes

  • The Node adapter now validates the Host header against security.allowedDomains.

    7.3.6release notes

  • Astro components must be imported with the new query string to use the container renderer.

    7.3.5release notes

  • On Windows with an AI agent detected, astro dev and astro preview run in the foreground unless --background is passed.

    7.3.4release notes

  • The options type now prevents passing widths and densities together.

    7.3.3release notes

  • Dynamic values in MDX script and style children are now escaped; use set:html to explicitly render them as raw markup.

    7.3.2release notessecurity advisory

  • The minimum supported version of Sharp is now 0.35.4.

    7.2.8release notes

  • Cloudflare integrations now require Wrangler version 4.125.0 or newer.

    7.2.7release notes

  • Module imports added without a corresponding deferredRender entry are no longer preserved across writes.

    7.2.5release notes

  • Astro CSP no longer emits hashes for directives using unsafe-inline.

    7.2.5release notes

  • The undocumented internal app.pipeline property has been removed; adapters should use app.getLogger() instead.

    7.2.3release notes

  • The AppPipeline export from astro/app has been removed; adapters should use app.getLogger() instead.

    7.2.3release notes

  • Files in directories whose names start with pages are no longer treated as page routes.

    7.2.2release notes

  • Content collection references to missing entries now produce an error after loaders finish syncing.

    7.2.1release notes

  • Removes an unused and undocumented generic parameter from the logger destination type.

    7.1.0release notes

  • Advanced routing is enabled by default, so its experimental flag is no longer needed.

    7.0.0upgrade guide

  • The Astro DB CLI command is no longer available.

    7.0.0release notesupgrade guide

  • The Astro init CLI command is no longer available.

    7.0.0release notesupgrade guide

  • The Astro link CLI command is no longer available.

    7.0.0release notesupgrade guide

  • The Astro login CLI command is no longer available.

    7.0.0release notesupgrade guide

  • The Astro logout CLI command is no longer available.

    7.0.0release notesupgrade guide

  • Deprecated transition constants, event guards, and createAnimationScope() can no longer be used.

    7.0.0release notesupgrade guide

  • Deprecated transition constants and event-checking helpers are removed; use lifecycle event names directly.

    7.0.0upgrade guide

  • The Rust-based compiler is now the default, improving build speed and development iteration while enforcing stricter syntax handling.

    7.0.0release notesupgrade guide

  • The unmaintained Astro DB package has been removed and projects must choose another database solution.

    7.0.0release notes

  • The package has been removed and is no longer maintained; projects must remove the dependency and choose another database option.

    7.0.0upgrade guideupgrade guide

  • The remark/rehype processor is no longer installed by default and must be installed explicitly to use that pipeline.

    7.0.0release notesupgrade guide

  • The package is no longer installed by default; install it to keep using unified plugins.

    7.0.0upgrade guide

  • Route caching is stable and the cache configuration moves from experimental.cache to the top level.

    7.0.0release notesupgrade guide

  • The default is now JSX-style HTML compression, removing surrounding whitespace while preserving meaningful inline spaces.

    7.0.0release notesupgrade guide

  • The default changes from true to 'jsx', which strips HTML whitespace using JSX rules; set it to true to retain the previous behavior.

    7.0.0upgrade guide

  • This astro:transitions API can no longer be used.

    7.0.0upgrade guide

  • The experimental queued-rendering setting has been removed because the new rendering engine is stable.

    7.0.0release notesupgrade guide

  • The experimental compiler-selection flag has been removed because the Rust compiler is now default.

    7.0.0release notesupgrade guide

  • The entrypoint setting is now top-level and can be set to a custom file or null.

    7.0.0release notesupgrade guide

  • The compiler no longer restructures semantically invalid HTML, so previously tolerated markup may produce different rendered output.

    7.0.0upgrade guide

  • This astro:transitions API can no longer be used; use the lifecycle event name directly instead.

    7.0.0upgrade guide

  • This astro:transitions API can no longer be used; use the lifecycle event name directly instead.

    7.0.0upgrade guide

  • Use locals to share per-request state instead of the removed public advanced routing context provider extension points.

    7.0.0upgrade guide

  • Astro now renders Markdown and MDX with Sätteri instead of the remark/rehype pipeline by default.

    7.0.0upgrade guide

  • This deprecated option still works, but now requires @astrojs/markdown-remark to be used.

    7.0.0upgrade guideupgrade guide

  • Queued rendering is now enabled by default, so the experimental flag is no longer needed.

    7.0.0upgrade guide

  • Route caching rules are stable and routeRules moves from experimental.routeRules to the top level.

    7.0.0release notesupgrade guide

  • The Rust-based compiler replaces the Go-based compiler as the default and only compiler.

    7.0.0upgrade guide

  • Markdown files now use the native Sätteri processor by default instead of the remark/rehype pipeline.

    7.0.0release notesupgrade guide

  • Advanced routing now uses src/fetch.ts as its default entrypoint.

    7.0.0release notesupgrade guide

  • This file name is reserved for advanced routing configuration and Astro automatically imports it; existing files with this name may cause errors.

    7.0.0upgrade guide

  • The public advanced-routing provider extension point is now internal-only; integrations should use locals for per-request state.

    7.0.0release notesupgrade guide

  • Removed from the public advanced routing API; integrations that used this context provider extension point should use locals for per-request state.

    7.0.0upgrade guide

  • Non-void HTML and component elements must have matching closing tags; templates with unclosed tags now produce errors.

    7.0.0upgrade guide

  • Astro now supports Vite 8.

    7.0.0release notesupgrade guide

Security 18

  • When strictDynamic is enabled, Astro adds hashes for bundled scripts to script-src and renders an import map with their integrity in the head, preventing bundled scripts and hydrated islands from being blocked.

    7.4.9release notes

  • Fixes the image endpoint treating directories whose names differ only by letter case as being inside the build output directory on case-sensitive filesystems.

    7.4.7release notessecurity advisory

  • CSP hashes added by components rendered inside body are now included in the CSP meta element in static builds, including MDX pages.

    7.4.3release notes

  • CSRF protection now takes modern browser headers into account.

    7.3.6release notes

  • Domain-based i18n routing now respects allowed request host domains when selecting a locale.

    7.3.4release notes

  • Astro: Arbitrary CSS injection in Astro View Transitions

    7.3.3security advisory

  • SVG <style> elements nested inside <defs> or other containers are now hashed for CSP.

    7.3.3release notes

  • Astro: Remote code execution through AVIF image optimization

    7.2.8security advisory

  • Non-UUID cookie values are rejected before they are used as storage keys.

    7.2.5release notes

  • Base path stripping now respects path-segment boundaries, keeping routing and context.url.pathname consistent.

    7.2.4release notessecurity advisory

  • Hardens development metadata when embedding dynamic values.

    7.1.0release notes

  • Hardens generated transition styles when embedding dynamic values.

    7.1.0release notessecurity advisory

  • Hardens server island URLs when embedding dynamic values.

    7.1.0release notes

  • Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)

    7.0.6security advisory

  • The origin check now applies consistently to Astro Actions and on-demand endpoints across request pipeline compositions.

    7.0.6release notessecurity advisory

  • Forwarded host validation now occurs before trusting X-Forwarded-For for clientAddress, protecting forwarded request handling.

    7.0.4release notes

  • Transition directive values are HTML-escaped when rendered on hydrated islands.

    7.0.4release notessecurity advisory

  • Astro now enforces stricter limits on URL decoding operations.

    6.4.8, 7.0.0release notesrelease notesupgrade guide

Deprecations 4

  • Returning a plain array from getStaticPaths is deprecated because images used on those pages are not generated.

    7.4.0release notes

  • Returning a plain Response from render is deprecated because images used on those pages are not generated.

    7.4.0release notes

  • Deprecation messages now target Astro 8.

    7.2.5release notes

  • Importing getContainerRenderer from an official integration's package root is deprecated; use its container-renderer entrypoint.

    7.0.0upgrade guide

New APIs and options 49

  • astro add can configure tagged versions of official adapters.

    7.4.4release notes

  • The new flag prints build timing summaries to help identify slow integrations, processors, image processing, or syntax highlighting.

    7.4.0release notes

  • Permite conservar el enrutamiento integrado de Astro y añadir preprocesamiento y posprocesamiento personalizados en un solo lugar.

    7.4.0docs

  • Static pages can be rendered in parallel across CPU cores to reduce build times, with higher memory usage.

    7.4.0release notes

  • Static redirect pages can be customized with a project-provided page for branding or translation.

    7.4.0release notes

  • Font provider init contexts now include a fetch function that requests provider APIs and retries transient failures.

    7.4.0release notes

  • Font providers can expose supported weights, styles, subsets, and formats so Astro can warn about unavailable configuration values.

    7.4.0release notes

  • Image services can now be configured separately for build-time prerendering and runtime on-demand rendering.

    7.4.0release notes

  • The new handler renders the custom 404 page for unmatched routes in astro/fetch and astro/hono integrations.

    7.4.0release notes

  • Custom prerenderers can access the final client, server, and prerender output locations.

    7.4.0release notes

  • Adds a container function that renders Astro components with inlined styles and scripts.

    7.3.5release notes

  • Passing --background explicitly requests an Astro-managed background process.

    7.3.4release notes

  • Adds --ignore-lock so multiple preview servers can run simultaneously on different ports, useful for E2E testing workflows.

    7.3.0release notes

  • Custom cache providers receive Astro's runtime logger in the onRequest context.

    7.3.0release notes

  • Custom image services receive Astro's runtime logger so messages follow the configured destination and log level.

    7.3.0release notes

  • APNG files can be imported as image metadata for standard img elements; image components continue rejecting them to preserve animation.

    7.2.5release notes

  • Adapters can use app.getLogger() to wait for the configured log destination.

    7.2.3release notes

  • Starts preview servers as background processes and returns after the server is ready.

    7.2.0release notes

  • Setting this environment variable to 0 opts out of automatic background mode for preview servers.

    7.2.0release notes

  • Displays logs from a preview server running in the background.

    7.2.0release notes

  • Follows logs from a background preview server.

    7.2.0release notes

  • Inspects a preview server running in the background.

    7.2.0release notes

  • Stops a preview server running in the background.

    7.2.0release notes

  • The render method may return a Response or PrerenderResult containing metadata for incremental static builds.

    7.2.0release notes

  • A cacheKey can identify generated pages from getStaticPaths() for incremental static builds.

    7.2.0release notes

  • Content collection entries optionally expose a loader-provided digest to detect content changes without re-hashing entry bodies.

    7.2.0release notes

  • Enables experimental incremental static builds that skip unchanged pages from dynamic routes.

    7.2.0release notes

  • Adds session: false to opt out of session support.

    7.2.0release notes

  • Adds a chunkSize setting to control the size of chunks used by collectionStorage.

    7.1.6release notes

  • Allows a development server to run without checking or writing the project lock file.

    7.1.0release notes

  • Adds chunked persistence for large content layer data stores to avoid platform file-size limits.

    7.1.0release notes

  • Adds deferred rendering for renderable content entries, reducing memory usage during large astro build operations.

    7.1.0release notes

  • Allows the logger entrypoint to be configured with a URL.

    7.1.0release notes

  • Allows CSP resources and hashes to target element-specific or attribute-specific script and style directives.

    7.1.0release notes

  • The AstroRuntimeLogger interface is now exposed so runtime logger functions can be typed properly.

    7.0.8release notes

  • Shared helpers are exported for CDN cache provider authors to build headers, invalidation tags, and normalized options.

    7.0.0release notesupgrade guide

  • The new flag starts the development server as a detached background process.

    7.0.0release notesupgrade guide

  • Setting this environment variable to 0 opts out of automatic background mode when an AI coding agent is detected.

    7.0.0release notesupgrade guide

  • A new subcommand displays logs from a background development server and can stream new output.

    7.0.0release notesupgrade guide

  • A new subcommand reports whether a development server is running, including its URL, PID, and uptime.

    7.0.0release notesupgrade guide

  • A new subcommand stops a running background development server.

    7.0.0release notesupgrade guide

  • Lets .astro pages set server-rendered response caching directives.

    6.0.0, 7.0.0release notesupgrade guide

  • Cache providers now receive the incoming Request as a second argument when generating response headers.

    7.0.0release notesupgrade guide

  • Official integrations provide a dedicated container-renderer entrypoint for importing getContainerRenderer instead of importing it from the package root.

    7.0.0upgrade guide

  • Lets API routes and middleware set and inspect server-rendered response caching directives.

    6.0.0, 7.0.0release notesupgrade guide

  • Configure a different advanced routing file name or set the option to null to disable advanced routing.

    7.0.0upgrade guide

  • Streams new output while viewing logs from a background dev server; -f is also supported.

    7.0.0upgrade guide

  • FontData entries now expose the subset name so applications can distinguish font entries sharing weight and style.

    7.0.0release notesupgrade guide

  • getFetchState() is now public from astro/hono, allowing custom Hono middleware to access Astro per-request state.

    7.0.0release notesupgrade guide

Performance 16

  • Projects that do not configure fonts load font resolution dependencies only when fonts are used, improving startup time for every astro command.

    7.4.13release notes

  • Reduces memory usage by releasing content collection entries from memory once the content layer sync is complete.

    7.4.12release notes

  • Astro commands start faster because SVGO loads only when svgoOptimizer() optimizes an SVG, rather than whenever astro/config is imported.

    7.4.10release notes

  • Content sync with chunked collection storage computes UTF-8 widths from code points instead of encoding every character, substantially speeding up chunking with byte-identical output.

    7.4.2release notes

  • The dev server no longer re-evaluates the whole server module graph on every request.

    7.3.4release notes

  • Startup is faster because content configuration and app module graphs compile during server creation without blocking listening.

    7.3.3release notes

  • Rendering performance improves.

    7.3.3release notes

  • Improves build performance for sites with many pages originating from many different modules.

    7.3.0release notes

  • Each route is deserialized only once when loading the SSR manifest.

    7.2.7release notes

  • The local Astro CLI uses Node's module compilation cache to improve performance.

    7.2.5release notes

  • No-op pathname writes are skipped when normalizing SSR request URLs.

    7.2.5release notes

  • Incremental builds are no longer prohibitively slow for sites with many pages or content entries sharing a large dependency graph.

    7.2.2release notes

  • getCollection() is faster for entries without local image references.

    7.2.1release notes

  • getEntry() is faster for entries without local image references.

    7.2.1release notes

  • The session runtime and unstorage dependencies are tree-shaken when no session driver is configured, reducing SSR bundle cold-start parsing.

    7.2.0release notes

  • Rendering is faster for pages with many component instances, including repeated MDX Content components.

    7.0.8release notes

Behavior and default changes 20

  • Custom prerenderers can return image metadata from getStaticPaths so Astro generates images used on prerendered pages.

    7.4.0release notes

  • Dynamic routes in static mode must export getStaticPaths() to return every path that should be generated at build time.

    7.4.0docs

  • Dev mode uses path-based class name hashing so CSS edits do not change generated selectors or require a full reload.

    7.3.6release notes

  • YAML parsing now supports timestamps and merge keys, with consistent errors across Astro, Markdown, MDX, and Markdoc.

    7.3.6release notes

  • On Windows, the command runs in the foreground when an AI agent is detected, allowing the agent to manage its process lifetime.

    7.3.4release notes

  • Incremental builds support concurrent rendering, including when using @astrojs/cloudflare.

    7.3.0release notes

  • Remaining internal warnings and errors use the configured logger instead of writing directly to the console when possible.

    7.3.0release notes

  • Generated and default Cloudflare compatibility dates now match the installed runtime.

    7.2.7release notes

  • Package manager detection for install commands now recognizes the devEngines field in package.json.

    7.2.0release notes

  • Accepts paths relative to the project root, while package specifiers, absolute paths, and URL entrypoints continue working.

    7.2.0release notes

  • URL-safe cookie values are no longer percent-encoded, while encoded values continue to round-trip exactly as before.

    7.1.2release notes

  • Generated image styles now use @layer astro.images, giving user-defined CSS layers higher cascade priority.

    7.0.1release notes

  • Advanced routing is now stable and enabled by default.

    7.0.0release notesupgrade guide

  • Route caching is stable; move cache out of the experimental config block.

    7.0.0upgrade guide

  • context.logger is now always defined in API routes and middleware, even without custom logger configuration.

    7.0.0release notesupgrade guide

  • The Rust compiler may serialize color values differently and add or remove quotes around url() values; the notes describe these differences as cosmetic.

    7.0.0upgrade guide

  • The experimental advanced-routing flag should be removed because the feature is enabled by default.

    7.0.0release notes

  • The logging system is stable; configure it directly in the top-level logger field instead of under experimental.

    7.0.0upgrade guideupgrade guide

  • Route caching is stable; move routeRules out of the experimental config block.

    7.0.0upgrade guide

  • Rendering now streams components as they are encountered and flushed instead of constructing a queue.

    7.0.0release notes

Tooling 6

  • CLI argument parsing is updated.

    7.4.8release notes

  • Astro CLI commands can now install tagged package versions.

    7.3.6release notes

  • The TypeScript 7 error now explains the unsupported status and provides experimental type-checking instructions.

    7.3.4release notes

  • Editing action files during development now applies on the next request without restarting the dev server.

    7.0.3release notes

  • The development server writes a lock file containing its URL, port, and PID to prevent duplicate servers.

    7.0.0release notes

  • Astro v7 upgrades its development server and production bundler to Vite 8; projects using Vite-specific plugins, configuration, or APIs may need updates.

    7.0.0upgrade guide

Fixes and other changes 258

  • The dev toolbar audit no longer reports anchors and headings hidden with visibility: hidden or inside an aria-hidden="true" subtree.

    7.4.13release notes

  • The logs command no longer treats a server started with ASTRO_DEV_BACKGROUND=0 as a background server.

    7.4.13release notes

  • The status command no longer treats a server started with ASTRO_DEV_BACKGROUND=0 as a background server.

    7.4.13release notes

  • The preview status and logs equivalents no longer treat a server started with ASTRO_PREVIEW_BACKGROUND=0 as a background server.

    7.4.13release notes

  • Font preload links are emitted when a requested weight range falls within a variable font file's range.

    7.4.13release notes

  • Fallback works when its target locale is defined with a custom path, avoiding i18nNoLocaleFoundInPath.

    7.4.13release notes

  • The dev toolbar audit no longer fetches lazy-loaded images to measure them, preventing frozen animated SVGs in Safari and unintended downloads.

    7.4.13release notes

  • Server bundles no longer include every renderable content collection entry when no server-rendered route calls render() from astro:content.

    7.4.13release notes

  • The dev server permits cross-origin requests from origins allowed by allowedDomains entries with a default port.

    7.4.13release notes

  • Framework components receiving sparse array props hydrate correctly by serializing holes as undefined.

    7.4.13release notes

  • Fixes a typo in the error message shown when a font cssVariable is invalid.

    7.4.12release notes

  • Preserves the license file generated by Vite's build.license option by removing only Astro's own Vite manifest from the .vite/ output folder.

    7.4.11release notes

  • When installed @astrojs/check throws while loading, astro check now shows the original error instead of reporting the package as missing and prompting for installation.

    7.4.11release notes

  • Spreading the same object onto an element with scoped styles no longer mutates its class on each render.

    7.4.11release notes

  • Malformed percent-encoded paths in the dev server and static preview return 400 Bad Request instead of bubbling into a 500.

    7.4.11release notes

  • The audit no longer freezes image CSS animations in Safari because it reads image size from the loading request instead of fetching the image again.

    7.4.10release notes

  • The client build no longer emits or preloads stylesheets already linked by the server build for hydrated islands that share modules or use a path alias.

    7.4.10release notes

  • Static builds no longer skip or fail on pages whose getStaticPaths() params contain characters such as % or \; Astro also warns when a prerendered page is skipped after returning an empty error response.

    7.4.9release notes

  • Errors thrown after a page starts streaming are reported once through the configured logger as one error record in production and astro dev.

    7.4.9release notes

  • Bundling a <script src> with a root-relative path to a project file outside src/ no longer triggers the is:inline error; that error is now shown only for paths pointing to a file in public/.

    7.4.9release notes

  • When stdout is piped to a slow reader, output including the Result summary is no longer lost; an early pipe close exits with code 1 instead of an EPIPE stack trace.

    7.4.6release notes

  • Starting the dev server without an existing .astro directory no longer causes an extra reload on the first page load.

    7.4.6release notes

  • Content-store clear or delete operations no longer trigger an unnecessary full page reload when the store has no asset imports.

    7.4.6release notes

  • Client-only components and scripts are no longer attributed to unrelated pages that import astro:i18n.

    7.4.6release notes

  • Full reloads now use native browser scroll restoration, preventing a brief jump to the top before restoring the previous scroll position.

    7.4.6release notes

  • The loader no longer adds files from a folder excluded with a negation pattern when those files change during astro dev.

    7.4.6release notes

  • Locale-prefixed requests for pages available only in the fallback locale are now rewritten or redirected according to i18n.routing.fallbackType; query strings are preserved and explicit page statuses and redirects remain unchanged.

    7.4.6release notes

  • Cached font files and unchanged public files retain their last-modified dates when copied into build output, subject to the noted symlink and plugin-overwrite behavior.

    7.4.6release notes

  • Now considers fallbackRoutes, aligning it with matchRoute and the production router so dev-server fallback requests resolve source-route metadata and SSR-only candidates can reach the prerender handler.

    7.4.6release notes

  • The error now includes why Sharp failed to load, such as prebuilt binaries not supporting the current CPU.

    7.4.6release notes

  • Calling route.generate() without arguments on static routes no longer throws a TypeError.

    7.4.6release notes

  • Running this or other background server commands from a sandbox or as a user unable to signal the server no longer deletes the running server’s lock file.

    7.4.5release notes

  • Values containing $ sequences are no longer corrupted during astro build when server code reads the import.meta.env object directly.

    7.4.5release notes

  • The command no longer prints a DEP0190 deprecation warning on Node.js 24 and later.

    7.4.3release notes

  • Type errors in built-in components are fixed when projects extend this tsconfig and type-check with tsc and @astrojs/ts-content-mapper.

    7.4.3release notes

  • The CLI now runs on StackBlitz WebContainers using Node.js >=22.22.0, whose Node.js version users cannot change.

    7.4.3release notes

  • Skipping a pending view transition no longer causes an unhandled AbortError rejection.

    7.4.3release notes

  • Back/forward scroll restoration is instant when scroll-behavior: smooth is set, matching native browser behavior.

    7.4.3release notes

  • Empty children on external stylesheets and scripts are no longer hashed, preventing the empty-string SHA-256 from being added to script-src and style-src.

    7.4.3release notes

  • Building pages that render SVG imports with Image or getImage no longer crashes with a DataCloneError when parallel prerendering is enabled.

    7.4.3release notes

  • Equivalent density values such as 1 and '1x' no longer produce duplicate srcset candidates.

    7.4.3release notes

  • Equivalent density values no longer produce duplicate srcset candidates, and a density of 1 no longer adds a duplicate 1x candidate to source srcset.

    7.4.3release notes

  • Scoped styles of unused Astro components re-exported from a barrel file are no longer included in the build.

    7.4.3release notes

  • Failed island requests caused by network errors no longer trigger an uncaught browser TypeError; fallback content is kept.

    7.4.3release notes

  • Styles for transition:name no longer go missing in dev when the element is inside a component rendered only through another component with no styles or scripts.

    7.4.3release notes

  • Fixes development with @astrojs/cloudflare when a server dependency such as cross-fetch requires node-fetch.

    7.4.2release notes

  • A successful process lookup with no matching PID now marks a lock file containing a Linux thread ID as stale, avoiding termination of an unrelated process.

    7.4.2release notes

  • The dev virtual module remains valid when environment variable values contain $ replacement patterns, preventing import-analysis parse failures.

    7.4.2release notes

  • The defineConfig() type accepts a custom locale's path rather than its codes, matching Astro's validation and use of the value.

    7.4.2release notes

  • Development uses framework-transformed CSS for inline styles, including scoped styles and Vue v-bind().

    7.4.2release notes

  • astro sync, astro check, and astro build no longer replace optimized dependencies used by a dev server in the same project, which could break framework islands until restart.

    7.4.2release notes

  • Fixes a dev server error for a deferred island importing astro:actions or astro:config/server when its page is not the first island page loaded after startup.

    7.4.2release notes

  • Fixes a TSCONFIG_ERROR when a parent directory contains a tsconfig.json that cannot be resolved.

    7.4.1release notes

  • Fixes an Unterminated string build error when application code imports from astro/config, such as fontProviders in a shared fonts module.

    7.4.1release notes

  • Fixes increasing memory usage when editing the Astro configuration while the dev server is running.

    7.4.1release notes

  • Style-only HMR no longer falls back to a full page reload when a PostCSS plugin lists the component as a dependency of its own style.

    7.4.1release notes

  • Production builds now include styles for conditionally rendered framework components imported by a hydrated island.

    7.4.1release notes

  • Cached optimized images and incrementally restored build output preserve their last modified dates when copied into the build output on all platforms.

    7.4.1release notes

  • Projects whose path contains an apostrophe can now load sessions, middleware, a cache provider, and a src/fetch.ts handler.

    7.4.1release notes

  • Original images are no longer retained when only width or height is read.

    7.4.0release notes

  • Deployment integrations can use Vite manifests when preparing build output.

    7.4.0release notes

  • Preserves existing allowBuilds approvals in pnpm-workspace.yaml when using pnpm v11.0–v11.22.

    7.3.8release notes

  • Astro.cache is no longer undefined when a custom 404 or 500 page is rendered by the error handler.

    7.3.8release notes

  • The glob() loader now reloads changed files in development when patterns start with an extglob.

    7.3.8release notes

  • Dependency installation failures now display the package manager's error output.

    7.3.7release notes

  • The command now installs dependencies successfully with pnpm v11+ by approving the workerd build script.

    7.3.7release notes

  • The configured cache provider is registered before rendering, making Astro.cache available to downstream handlers such as pages().

    7.3.7release notes

  • The cache() handler no longer throws a TypeError when a cache provider is configured.

    7.3.7release notes

  • AVIF images are served with the correct image/avif MIME type instead of image/heif in the dev server.

    7.3.7release notes

  • The layout frontmatter property is ignored for content collection entries, preventing a build error with deferred glob rendering.

    7.3.7release notes

  • Origin checks no longer reject cross-origin requests with non-form content types such as application/json.

    7.3.7release notes

  • Prevents intermittent dev server crashes when used inside a server island with adapters using a pre-bundled SSR environment.

    7.3.6release notes

  • Prevents Windows builds with Node.js 25+ from failing when clearing the output directory encounters a transient EPERM error.

    7.3.6release notes

  • Prevents CSS from other pages leaking into a page's head during development.

    7.3.6release notes

  • Dependency scanning no longer fails when an Astro file contains a literal script tag in frontmatter or a template expression.

    7.3.6release notes

  • Request cookies with empty values no longer produce undefined.

    7.3.6release notes

  • Astro.rewrite no longer selects the wrong route in astro dev when two dynamic routes match the same path.

    7.3.6release notes

  • Production builds no longer duplicate CSS when a component is server-rendered and also used with client:only.

    7.3.6release notes

  • Preserves request state when Vite discovers server dependencies during a request.

    7.3.6release notes

  • Content collection changes are no longer ignored in astro dev after a configuration-triggered server restart.

    7.3.6release notes

  • context.props is no longer null in middleware and endpoints for specified composable handler ordering.

    7.3.6release notes

  • context.rewrite no longer selects the wrong route in astro dev when two dynamic routes match the same path.

    7.3.6release notes

  • CSS Module HMR now works when a component is rendered both hydrated and non-hydrated on the same page.

    7.3.6release notes

  • Preloaded CSS files no longer return 404 when the imported module uses a component also hydrated as an island.

    7.3.6release notes

  • Rendered output no longer includes dev toolbar source attributes when components are rendered under Vitest.

    7.3.6release notes

  • Fixes type errors in Astro's built-in Font component when type-checking with tsc and the content mapper.

    7.3.6release notes

  • The fontsource provider now resolves variable fonts when the font name uses the Variable suffix.

    7.3.6release notes

  • The glob loader no longer skips content files whose paths contain hash or question-mark characters.

    7.3.6release notes

  • Composable i18n handlers now render the custom 404 page for paths without a locale prefix.

    7.3.6release notes

  • Routes added with injectRoute now work without a locale prefix when this option is enabled.

    7.3.6release notes

  • Injected routes without locale prefixes no longer return 404 when the default locale is prefixed.

    7.3.6release notes

  • CSS imported from a page injection script is no longer dropped during builds.

    7.3.6release notes

  • Localized error pages now return their error status instead of 200 through the pages handler.

    7.3.6release notes

  • Fixes type errors in Astro's built-in Picture component when type-checking with tsc and the content mapper.

    7.3.6release notes

  • Prevents stale scoped styles during HMR when markup and style change together.

    7.3.6release notes

  • Prevents hangs when a deferred component is inside another component's slot in an MDX content collection entry.

    7.3.6release notes

  • Framework components inside server islands no longer render empty in the dev server with a custom fetch file.

    7.3.6release notes

  • The server manifest assets array now has deterministic ordering, producing byte-identical builds from identical inputs.

    7.3.6release notes

  • Astro now works in StackBlitz and other WebContainer environments.

    7.3.6release notes

  • Removes a stale directive that caused MODULE_LEVEL_DIRECTIVE warnings during builds.

    7.3.6release notes

  • Muted video elements no longer lose their muted state after ClientRouter navigation in Chrome.

    7.3.6release notes

  • Custom direction names that are invalid CSS identifiers now match their animations correctly.

    7.3.6release notes

  • Responsive image styles no longer emit invalid object-position values for same-axis keyword pairs.

    7.3.4release notes

  • Unchanged pages are no longer repeatedly rendered when bundled assets are referenced by modules or compiled CSS.

    7.3.4release notes

  • Ampersands in Markdown image alt and title attributes are escaped exactly once in final HTML.

    7.3.4release notes

  • The dev overlay now shows the documented unsuffixed error name instead of a name ending in Error.

    7.3.4release notes

  • The dev overlay now shows the documented unsuffixed error name.

    7.3.4release notes

  • Importing astro:actions in Cloudflare Vitest pool worker tests no longer causes a WebAssembly error.

    7.3.3release notes

  • Writes outside the module graph no longer invalidate middleware and trigger repeated SSR reloads.

    7.3.3release notes

  • Renderer server entrypoints and the default console logger are pre-bundled during dev, preventing mid-request re-optimization crashes on Cloudflare.

    7.3.3release notes

  • The flag now starts preview or dev servers in the foreground in AI agent environments unless --background is also specified.

    7.3.3release notes

  • Locale matching now handles casing differences and underscores for object-form locale configurations.

    7.3.3release notes

  • Development URLs that merely share a prefix with the configured base are no longer incorrectly rewritten.

    7.3.3release notes

  • Content collection HMR now updates prerendered pages when adapters use a separate prerender environment.

    7.3.3release notes

  • CSS HMR now works for framework components rendered through content entries after ClientRouter navigation.

    7.3.3release notes

  • Custom dev toolbar app UIs now persist through client-side navigation with <ClientRouter />.

    7.3.3release notes

  • MDX files are included in dependency scanning so framework dependencies are bundled before runtime, preventing an initial page reload.

    7.3.3release notes

  • Restored pages no longer retain stale CSS after preprocessor changes or missing original images.

    7.3.3release notes

  • TypeScript autocompletion now suggests all available predefined options.

    7.3.3release notes

  • Deleted files are removed from the content data store, and new files in empty collections are detected without restarting.

    7.3.3release notes

  • Invalid and missing local image paths now return appropriate 400 and 404 responses.

    7.3.3release notes

  • Prerendered Cloudflare pages no longer render as [object Object] when nodejs_compat is enabled.

    7.3.3release notes

  • Dynamic route parameters containing $ replacement patterns no longer corrupt redirect targets.

    7.3.3release notes

  • Redirect response HTML now points to the corrected trailing-slash target and preserves the query string.

    7.3.3release notes

  • Generated CSS now serializes transition animation values more reliably.

    7.3.3release notes

  • Prevents a 504 Outdated Optimize Dep error when workspace-linked packages import dependencies missed by Vite's initial scan.

    7.3.2release notes

  • Fixes sessions breaking in dev mode when using the Cloudflare adapter with middleware.

    7.3.2release notes

  • Fixes an error that prevented projects using astro:assets from starting or building.

    7.3.1release notes

  • Incremental builds no longer disable caching when build.concurrency is greater than 1, so the workaround setting it to 1 can be removed.

    7.3.0release notes

  • Fallback routing now replaces the actual locale segment instead of the first matching substring, preventing mangled paths.

    7.3.0release notesrelease notes

  • The memory cache provider now skips responses with Vary: Cookie or Vary: *.

    7.3.0release notes

  • Restores missing styles, links, and scripts from content collection entries rendered inside server islands.

    7.3.0release notes

  • The package is no longer pinned to an exact version, allowing compatible version resolution.

    7.2.10release notes

  • Cached responses containing Last-Modified or ETag validators are handled correctly by browser heuristic caching.

    7.2.10release notes

  • Editing entries during astro dev on Windows now refreshes served content without restarting the dev server.

    7.2.10release notes

  • Runtime logger initialization in development is corrected.

    7.2.10release notes

  • Images no longer render an empty srcset attribute when no responsive candidates are generated.

    7.2.10release notes

  • Warnings correctly identify the route that first rendered a duplicate pathname instead of an unrelated matching route.

    7.2.10release notes

  • The placeholder is replaced correctly in minified server builds, preventing an Invalid URL crash at server boot.

    7.2.10release notes

  • SSR manifests no longer reference prerender-only chunks absent from final build output.

    7.2.9release notes

  • .html imports are now typed outside .astro files.

    7.2.9release notes

  • Requesting /index.html no longer crashes against a dynamic page route.

    7.2.9release notes

  • set:text escaping now works correctly in MDX script and style elements.

    7.2.9release notes

  • next now works for GET and HEAD requests with host-provided bodies.

    7.2.7release notes

  • rewrite now works for GET and HEAD requests with host-provided bodies.

    7.2.7release notes

  • Route selection now works correctly for normalized request paths in adapters and development request handling.

    7.2.7release notes

  • The experimental svgOptimizer now generates unique per-file ID prefixes with SVGO's prefixIds plugin.

    7.2.7release notes

  • Fixes development failures when creating FetchState with a request while server dependencies are optimized.

    7.2.6release notes

  • CLI flags are preserved when running the development server in the background.

    7.2.5release notes

  • Accept-Language quality values are honored, including implicit quality 1.0 and q=0 rejection.

    7.2.5release notes

  • Locale selection now honors Accept-Language quality values regardless of header order.

    7.2.5release notes

  • Wrapped plugin errors now show the correct file location, line and column, and hints.

    7.2.5release notes

  • A regression that could prevent content collection images from being resolved is fixed.

    7.2.5release notes

  • The development server can restart in Docker containers without failing due to PID reuse in the lock-file check.

    7.2.5release notes

  • Valid font URLs are no longer rejected when using the Cloudflare adapter.

    7.2.5release notes

  • i18n rewrite fallback returns 404 instead of 500 when no matching prerendered static path exists.

    7.2.5release notes

  • The content loader now loads files whose names contain colons.

    7.2.5release notes

  • The image() schema now includes apng so content collection images match imported image types.

    7.2.5release notes

  • Stylesheet-only edits no longer serve cached HTML referencing stale CSS filenames.

    7.2.5release notes

  • Responses that set cookies through Astro.cookies or Astro.session are no longer stored.

    7.2.5release notes

  • Deferred components importing from astro:i18n no longer crash the development server.

    7.2.5release notes

  • Persisted transitions work again for audio and video elements.

    7.2.5release notes

  • User configuration for ssr, prerender, and client environments is now properly deep-merged with Astro's internal settings.

    7.2.5release notes

  • User-provided environment settings are deep-merged with Astro's internal settings instead of breaking server entry naming.

    7.2.5release notes

  • Builds no longer hang when an image file is malformed.

    7.2.4release notes

  • Astro.site is now available when rendering components through the Container API if site is configured.

    7.2.4release notes

  • Dynamic routes no longer throw Missing parameter with build.format preserve and trailingSlash always.

    7.2.4release notes

  • Composable request helpers no longer throw when used on requests rewritten with Astro.rewrite() or next().

    7.2.3release notes

  • If a configured logger fails to load, Astro reports the error and continues with the default console logger.

    7.2.3release notes

  • The dev server now recognizes route changes after pages are added, removed, or renamed without requiring a restart.

    7.2.3release notes

  • Prevents out-of-memory errors when chunked collection storage receives multiple concurrent updates to the same collection.

    7.2.3release notes

  • new FetchState(request) now works anywhere inside a built Astro server, including custom src/fetch.ts entrypoints.

    7.2.3release notes

  • getCollection() no longer throws DataCloneError when collection schema transforms return Temporal.PlainDate or other class instances.

    7.2.3release notes

  • getEntry() no longer throws DataCloneError when collection schema transforms return Temporal.PlainDate or other class instances.

    7.2.3release notes

  • Requests with malformed ports in the Host header now fall back to a server-controlled host instead of throwing.

    7.2.3release notes

  • SSR full reloads triggered by third-party Vite plugins no longer fail to load astro:server-app.js.

    7.2.3release notes

  • astro dev now cleans stale lock files after Docker restarts and avoids signaling unrelated processes when --force is used.

    7.2.2release notes

  • Incremental builds no longer drop optimized images for cached pages when using a collectStaticImages prerenderer.

    7.2.2release notes

  • Component styles from content entries no longer remain stale until a second save in Astro's fallback development environment.

    7.2.2release notes

  • The Fonts API no longer breaks experimental.incrementalBuild caching because generated dependency-hash code uses a build-local server port.

    7.2.2release notes

  • Builds reduce intermittent ImageNotFound errors on projects with many images by limiting concurrent reads and retrying transient I/O failures.

    7.2.2release notes

  • The setting now applies to duplicate ID warnings from glob() and file() content loaders, throwing for 'error' and suppressing warnings for 'ignore'.

    7.2.2release notes

  • CSS hot module replacement now works after navigating between pages with ClientRouter.

    7.2.1release notes

  • Builds no longer fail because generated content collection image import identifiers collide.

    7.2.1release notes

  • Incremental builds no longer re-render unchanged routes that import multiple assets.

    7.2.1release notes

  • Middleware HMR now reloads when imported modules change, not only when the middleware file itself changes.

    7.2.1release notes

  • CSP no longer rejects speculation rules when security.csp and experimental.clientPrerender are used with data-astro-prefetch links.

    7.2.1release notes

  • Video and audio elements remain functional after navigation via view transitions.

    7.2.1release notes

  • Avoids crashing with Invalid URL when --host uses a specific non-loopback address.

    7.2.0release notes

  • Preserves cookies set inside custom 404.astro or 500.astro error pages in the final response.

    7.2.0release notes

  • Returns the correct .html pathname for non-index pages when build.format is preserve.

    7.2.0release notes

  • Prevents a build crash when an older hoisted neotraverse version is present at the project root.

    7.2.0release notes

  • Returns only requested glyphs instead of the full icon font when multiple experimental glyphs are specified.

    7.2.0release notes

  • Boolean popover values on custom elements render as a bare attribute or are omitted, instead of popover="true" or popover="false".

    7.2.0release notes

  • Prevents stale CSS after editing component style blocks and CSS files during development.

    7.1.6release notes

  • Concurrent static builds now generate i18n rewrite fallbacks correctly for dynamic routes.

    7.1.6release notes

  • Resolved action function properties are no longer incorrectly treated as routable path segments.

    7.1.5release notes

  • Custom error pages now render after middleware rewrites target routes returning empty 404 or 500 responses.

    7.1.5release notes

  • Custom logger.entrypoint values now load correctly at runtime in built server bundles.

    7.1.5release notes

  • Errors while finalizing a request no longer prevent a response from being sent.

    7.1.5release notes

  • Session runtime errors now route through Astro's logger instead of being silently swallowed by console.error.

    7.1.4release notes

  • TypeScript path aliases from tsconfig.json now resolve correctly in astro.config.ts.

    7.1.4release notes

  • The background prop is now included in Image and Picture component types, preventing astro check errors.

    7.1.4release notes

  • Scoped styles for child components inside client:only islands are now included in production builds.

    7.1.4release notes

  • Server output now emits one shared stylesheet when prerendered and server-rendered pages use the same CSS source modules.

    7.1.4release notes

  • glob loader watcher negation patterns now exclude matching files during development as they do during the initial scan.

    7.1.4release notes

  • A storage failure during session regeneration no longer leaves the session partially initialized or causes unnecessary later storage reads.

    7.1.4release notes

  • Background dev servers on Windows no longer open a visible terminal window or steal focus.

    7.1.4release notes

  • astro build now respects container CPU limits during image optimization, reducing peak memory usage and preventing out-of-memory crashes.

    7.1.3release notes

  • Mutations to Astro.locals during the request lifecycle are now preserved and passed to custom error pages.

    7.1.2release notes

  • The fetch fallback for prefetch now catches rejected requests in WebKit, preventing flaky connections from causing unhandled promise rejections.

    7.1.2release notes

  • Encoded request paths are now routed correctly when using domain-based i18n.

    7.1.1release notes

  • Fixes crashes in non-Node runtimes by using console logging instead of process stdout and stderr.

    7.1.0release notes

  • Preserves existing behavior for configured script and style resources when using element-specific CSP directives.

    7.1.0release notes

  • Fixes integrations being unable to update the logger configuration.

    7.1.0release notes

  • Fixes browser navigation returning 404 for assets imported with the ?url query.

    7.1.0release notes

  • The first browser visit after starting astro dev no longer triggers an immediate full page reload.

    6.1.10, 7.0.9release notesrelease notes

  • Client islands now recover from transient component import failures instead of permanently failing to hydrate.

    7.0.9release notes

  • The compiler was updated to fix multiple regressions.

    7.0.8release notes

  • The --force flag now replaces an already-running development server.

    7.0.8release notes

  • The --open flag now opens a browser when using an adapter with a custom preview entrypoint.

    7.0.8release notes

  • Fixes a dev server memory leak that caused Node.js warnings in the console.

    7.0.7release notes

  • Keeps CSS @import rules at valid positions after inline CSS chunks are merged during build.

    7.0.7release notes

  • Inlined scripts with ignored dynamic URL imports no longer fail at runtime because of unresolved Vite preload markers.

    7.0.7release notesrelease notes

  • Fixes CSS module scoped-name hash mismatches in astro dev when using Lightning CSS with content collections.

    7.0.7release notes

  • astro check now finds @astrojs/check and typescript when Astro is installed outside the project tree.

    7.0.6release notes

  • Scripts inside components rendered through Astro.slots.render() remain next to their component content.

    7.0.6release notes

  • Attribute rendering is now handled more robustly when working with custom elements.

    7.0.6release notes

  • getViteConfig no longer crashes in Vitest browser mode because Astro skips dev server setup inside Vitest.

    7.0.6release notes

  • Using the Container API no longer produces a false deprecation warning for markdown.gfm.

    7.0.6release notes

  • Using the Container API no longer produces a false deprecation warning for markdown.smartypants.

    7.0.6release notes

  • Dynamic route parameters with the value 0 are now generated correctly instead of causing a missing-parameter error or being dropped.

    7.0.6release notes

  • Remote image dimensions are resolved once per render, avoiding failures when image servers rate-limit requests.

    7.0.6release notes

  • Live collection entries now expose the correct render() type overload when only live.config.ts is present.

    7.0.6release notes

  • Virtual style modules now include their CSS in dev mode when JavaScript is disabled.

    7.0.6release notes

  • Allows the background dev server to start when astro is hoisted outside the project's node_modules.

    7.0.5release notes

  • Preserves head elements after page transitions when the head contains a server:defer component.

    7.0.5release notes

  • Prevents requests from failing after adapter-based dev server restarts due to missing pre-bundled dependencies.

    7.0.5release notes

  • Restores prefetching for links inside server:defer components.

    7.0.5release notes

  • Prevents component style tags from being silently dropped when an await appears before the component in an .astro file.

    7.0.5release notes

  • The development toolbar now warns when implicit and manually specified ARIA roles are duplicated.

    7.0.4release notes

  • getCollection() no longer returns empty in dev mode for large content collections with 500k+ entries.

    7.0.4release notes

  • Dynamic file endpoints in dev mode no longer incorrectly require a trailing slash when trailingSlash is always.

    7.0.4release notes

  • An error in one route's getStaticPaths no longer prevents other valid routes from matching in dev mode.

    7.0.3release notes

  • Localized custom error routes such as /pt/404 are now used for missing localized pages and return the correct status code.

    7.0.3release notes

  • Background server output and astro dev status now show every exposed network URL.

    7.0.1release notes

  • Background development server startup no longer fails on Windows with a process spawn error.

    7.0.1release notes

  • Hybrid environments like Warp are no longer treated as AI agents for auto-background detection.

    7.0.1release notes

  • Advanced-routing pages() and middleware() handlers now render the custom 500.astro page when rendering or middleware throws.

    7.0.0release notesupgrade guide

  • The custom 500.astro page now receives the error prop when the error originated in middleware.

    7.0.0release notesupgrade guide

  • The --port flag is now preserved after a Vite-triggered server restart.

    6.1.7, 7.0.0release notesrelease notesupgrade guide

  • The handler now renders a custom 500.astro page when middleware throws and renders the 404 error page for unmatched requests; errors from the host framework downstream chain still propagate to its error handler.

    7.0.0upgrade guide

  • The handler now renders a custom 500.astro page when a page throws, and renders the 404 error page for unmatched requests with a prerendered or absent custom 404 page.

    7.0.0upgrade guide

  • The handler now renders a custom 500.astro page when a page throws, and renders the 404 error page for unmatched requests with a prerendered or absent custom 404 page.

    7.0.0upgrade guide

  • Internal Astro headers no longer leak from direct pages() handler responses.

    7.0.0upgrade guide

  • Astro.session is always defined, and accessing it without configured session storage logs a helpful message.

    7.0.0release notesupgrade guide

  • Internationalized domains no longer return 404 when trailingSlash is set to never.

    6.1.9, 7.0.0release notesrelease notesupgrade guide

  • Prerendered routes no longer emit a spurious Astro.request.headers warning when allowedDomains is configured.

    7.0.0release notesupgrade guide

astro 6435 changes

Breaking changes 115

  • Invalid HTML attribute names are now dropped instead of being accepted.

    6.4.6release notes

  • Redirect parameter mismatches now produce a clear InvalidRedirectDestination error during config validation.

    6.3.8release notes

  • isRemotePath() now rejects control characters after a leading slash.

    6.3.2release notes

  • Double-encoded URL paths now receive a 400 response instead of partially decoding silently.

    6.3.2release notes

  • SVG inputs are no longer rasterized by default; this flag opts back into processing them.

    6.3.0release notes

  • Remote image optimization now follows redirects and validates every redirected URL against configured patterns or domains.

    6.3.0release notes

  • The svgo experimental flag is removed and superseded by experimental.svgOptimizer.

    6.2.0release notes

  • Style persistence is limited to styles from Vue components instead of automatically persisting all style sheets.

    6.1.5release notes

  • Temporary support for the documented Node.js version range is removed because Stackblitz now uses Node 22 by default.

    6.0.6release notes

  • Route filenames can no longer contain the percent-encoded percent sign; rename affected files to avoid encoding-based security bypasses.

    6.0.0upgrade guide

  • Requests using prototype method names such as constructor or toString as action paths now return 404.

    6.0.0release notes

  • Removes the old app.render() signature.

    6.0.0release notesupgrade guide

  • This unused and unnecessary App method was removed. Create a new App instance if you need to update the manifest.

    6.0.0upgrade guide

  • Removes exposed astro:actions internals.

    6.0.0release notesupgrade guide

  • The add command and --add option now accept only valid npm package names, preventing possible command injection.

    6.0.0release notes

  • The hook is now called once with all environments configured; remove the target parameter and use vite.environments to configure specific environments.

    6.0.0upgrade guide

  • Astro components can no longer be rendered in Vitest client environments.

    6.0.0release notesupgrade guide

  • Removes the unused astro:ssr-manifest virtual module.

    6.0.0release notesupgrade guide

  • Types for the removed astro:ssr-manifest module are no longer provided.

    6.0.0release notes

  • Introduces astro/zod as the preferred source for schema utilities.

    6.0.0release notes

  • X-Forwarded-For is used only after the request host matches security.allowedDomains; otherwise the socket remote address is used.

    6.0.0release notes

  • CommonJS Astro config files with the .cts extension are no longer supported; migrate to a supported extension.

    6.0.0upgrade guide

  • Removes the previously deprecated Astro.glob().

    6.0.0release notesupgrade guide

  • Route pathname normalization may partially decode pathnames, so Astro.url.pathname can differ from new URL(Astro.request.url).pathname for percent-encoded segments.

    6.0.0upgrade guide

  • The Cloudflare adapter has significant changes, and existing Cloudflare setups are expected to require migration.

    6.0.0upgrade guide

  • The Rust compiler requires installing @astrojs/compiler-rs separately.

    6.0.0release notes

  • Replaces the self adapter entryType value.

    6.0.0release notes

  • Collection entries no longer provide a render() method; import render() from astro:content and call render(entry).

    6.0.0upgrade guide

  • Removes support for CommonJS configuration files.

    6.0.0release notesupgrade guide

  • Content collection types are now inferred instead of generated using zod-to-ts; loader-provided schemas must use TypeScript's satisfies operator.

    6.0.0upgrade guide

  • URLs with multiple leading slashes are normalized to one slash before middleware receives them.

    6.0.0release notes

  • This internal function is removed as an export from the astro:transitions virtual module and can no longer be imported in project files.

    6.0.0upgrade guide

  • The astro/app/node module exports a utility converting Node incoming messages into web-standard requests.

    6.0.0release notesupgrade guide

  • The cssesc dependency was removed and replaced with an ESM-friendly built-in implementation, avoiding occasional CommonJS-related errors.

    6.0.0release notes

  • The default image service no longer upscales images; adjust dimensions or upscale manually or with a custom image service if needed.

    6.0.0upgrade guide

  • The default image service now applies cropping by default without requiring the fit option.

    6.0.0upgrade guide

  • Removes the function signature for defining dynamic schemas in content loaders.

    6.0.0release notes

  • Removes the deprecated emitESMImage() function.

    6.0.0release notes

  • emitESMImage() is removed; replace it with emitImageMetadata() and remove the unused arguments.

    6.0.0upgrade guide

  • Endpoint URLs with a file extension cannot be accessed with a trailing slash.

    6.0.0release notesupgrade guide

  • Renames the adapter entryType property to entrypointResolution.

    6.0.0release notes

  • Removes entryPoints from the astro:build:ssr integration hook.

    6.0.0release notesupgrade guide

  • The experimental CSP configuration flag is removed and must be replaced with security.csp.

    6.0.0release notes

  • The experimental flag was removed because the feature is now stable; remove it from Astro config.

    6.0.0upgrade guide

  • The experimental flag was removed because the feature is now stable; use the prerenderConflictBehavior configuration option.

    6.0.0upgrade guide

  • The experimental fonts configuration flag is removed and replaced by the top-level fonts option.

    6.0.0release notes

  • The experimental Fonts API now downloads only woff2 files by default; formats can be specified explicitly.

    5.16.7, 6.0.0release notesrelease notes

  • The experimental flag was removed because the feature is now stable; remove it from Astro config.

    6.0.0upgrade guide

  • This experimental flag was removed and should be removed from Astro config; the notes identify it as a new default or recommended behavior.

    6.0.0upgrade guide

  • The experimental live collections flag must be removed because live content collections are now supported directly.

    6.0.0release notesupgrade guide

  • This experimental flag was removed because scripts and styles are now rendered in source order by default.

    6.0.0upgrade guide

  • This experimental flag was removed because import.meta.env values are always inlined and never coerced by default.

    6.0.0upgrade guide

  • Replaces the legacy-dynamic adapter entryType value.

    6.0.0release notes

  • When format is set, the default Sharp image service now attempts to rasterize SVG images, so check image formats if SVGs should not be converted.

    6.0.0upgrade guide

  • This legacy collection query method is no longer supported; replace it with getEntry().

    6.0.0upgrade guide

  • This legacy collection query method is no longer supported; replace it with getEntry().

    6.0.0upgrade guide

  • Throws an error when getImage() from astro:assets is called on the client.

    6.0.0release notesupgrade guide

  • Accessing Astro inside getStaticPaths() is deprecated; Astro.site logs a warning, while other unavailable properties throw a specific error. Replace Astro.site with import.meta.env.SITE and remove Astro.generator.

    6.0.0upgrade guide

  • Dynamic route params returned by getStaticPaths() must be strings or undefined; convert numeric params to strings.

    6.0.0upgrade guide

  • Removes the handleForms prop from the ClientRouter component.

    6.0.0release notesupgrade guide

  • Fallback middleware now triggers only for 404 responses instead of intercepting redirects, forbidden responses, and server errors.

    6.0.0release notes

  • Changes the default value of i18n.routing.redirectToDefaultLocale from true to false.

    6.0.0release notesupgrade guide

  • import.meta.env values are always inlined.

    6.0.0release notesupgrade guide

  • Changes integration hooks and HMR access patterns in the Integration API.

    6.0.0release notes

  • This internal function is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • This internal function is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • Removes legacy content collection support.

    6.0.0release notesupgrade guide

  • The legacy.collections flag and automatic legacy content collections support are removed; all content collections must use the Content Layer API.

    6.0.0upgrade guide

  • Content collections must define a loader; use Astro’s built-in glob() loader with a pattern and base when appropriate.

    6.0.0upgrade guide

  • Changes how IDs are generated for Markdown headings.

    6.0.0release notesupgrade guide

  • Adapters can specify middleware mode using middlewareMode, including the 'edge' value.

    6.0.0release notes

  • The minimum supported Node.js version increases to 22.12.0.

    6.0.0release notesupgrade guide

  • Changes the values allowed in params returned by getStaticPaths(); numbers are no longer allowed.

    6.0.0release notes

  • Routes containing percent-encoded percent signs such as %25 are no longer supported.

    6.0.0release notes

  • The with option was removed, so prefetch priority can no longer be configured with it. Prefetching automatically uses link prefetch when supported or falls back to fetch().

    6.0.0upgrade guide

  • Replaces experimental.failOnPrerenderConflict with prerenderConflictBehavior.

    6.0.0release notes

  • An exposed internal API of the preview server is removed.

    6.0.0release notes

  • The development server now blocks direct URL access to files outside srcDir and publicDir.

    6.0.0release notes

  • Responsive image styles are generated in a build-time virtual module and applied using a hash class and data attributes instead of inline style attributes.

    6.0.0upgrade guide

  • Removes rewrite() from the Actions context.

    6.0.0release notesupgrade guide

  • Removes RouteData.generate from the Integration API.

    6.0.0release notesupgrade guide

  • Removes routes from the astro:build:done integration hook.

    6.0.0release notes

  • The routes array is removed from astro:build:done; use astro:routes:resolved to access routes and the assets map for distURL.

    6.0.0upgrade guide

  • Content loaders can no longer define schema as a function. Use createSchema() to dynamically define a schema; the old form logs a warning and is ignored.

    6.0.0upgrade guide

  • script and style tags render in the order they are defined.

    6.0.0release notesupgrade guide

  • Replaces the experimental CSP flag with a stable security configuration option.

    6.0.0release notes

  • Server actions now enforce a default request body size limit to prevent oversized requests from exhausting memory.

    5.17.3, 6.0.0release notesrelease notes

  • Use server.environments.client.hot.send() instead of server.hot.send() to access HMR.

    6.0.0upgrade guide

  • This SSRManifest method is now async; await its result when accessing it.

    6.0.0upgrade guide

  • A session cookie without matching server-side data now causes a new session ID to be generated.

    6.0.0release notes

  • This SSRManifest method is now async; await its result when accessing it.

    6.0.0upgrade guide

  • Session drivers are now configured as objects created by provider helpers such as sessionDrivers.redis().

    6.0.0release notesupgrade guide

  • Removes setManifestData from App and NodeApp.

    6.0.0release notes

  • Updates the shiki dependency to v4.

    6.0.0release notesupgrade guide

  • CollectionEntry id is now a slug, replacing the prior slug property; use filePath when you need the filename previously available as id.

    6.0.0upgrade guide

  • The legacy content configuration file location must be renamed and moved to src/content.config.ts.

    6.0.0upgrade guide

  • Changes SSRManifest property shapes and adds required properties in the Adapter API.

    6.0.0release notes

  • The hrefRoot property is no longer available on the manifest.

    6.0.0upgrade guide

  • Path properties such as srcDir and outDir are now URL objects rather than URL strings; use the href property when the string form is needed.

    6.0.0upgrade guide

  • The adapter feature formerly named experimentalStaticHeaders is now configured as staticHeaders.

    6.0.0release notes

  • Removes the session test driver.

    6.0.0release notesupgrade guide

  • This internal constant is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • This internal constant is removed as an export from the transitions virtual modules; use the documented event string instead.

    6.0.0upgrade guide

  • This internal constant is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • This internal constant is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • This internal constant is removed as an export from the transitions virtual modules and can no longer be imported in project files.

    6.0.0upgrade guide

  • Collection definitions can no longer specify type: 'content' or type: 'data'; remove the type field.

    6.0.0upgrade guide

  • Removes the deprecated ViewTransitions component.

    6.0.0release notesupgrade guide

  • Configure client asset Rollup output filenames under vite.environments.client.build.rollupOptions.output instead of vite.build.rollupOptions.output.

    6.0.0upgrade guide

  • Astro rejects envPrefix entries that match secret environment variables, preventing exposure in client-side bundles.

    6.0.0release notes

  • Astro 6 upgrades to Vite v7.0 as the development server and production bundler.

    6.0.0release notesupgrade guide

  • Removes the with option from prefetch().

    6.0.0release notes

  • The astro/app/node module exports a utility streaming web-standard responses to Node server responses.

    6.0.0release notes

  • X-Forwarded-Proto is trusted only when security.allowedDomains is configured.

    6.0.0release notes

  • Astro 6 upgrades schema validation to Zod v4.

    6.0.0release notesupgrade guide

Security 25

  • Astro: Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch

    6.4.8security advisory

  • Prerendered error page requests now validate the origin and use the original origin only when the Host header matches configured allowed domains.

    6.4.6release notessecurity advisory

  • Astro: XSS via Unescaped Attribute Names in Spread Props

    6.4.6security advisory

  • Astro.request.url now reflects validated forwarded protocol and host headers when security.allowedDomains is configured, keeping it aligned with Astro.url.

    6.4.5release notes

  • The position prop on Image and Picture no longer breaks Content Security Policy.

    6.3.5release notes

  • Slot names on hydrated components are HTML-escaped in SSR output to prevent reflected XSS.

    6.3.3release notessecurity advisory

  • The configuration is respected by astro preview with the Cloudflare adapter, preventing DNS rebinding attacks when previewing Cloudflare builds locally.

    6.2.0release notes

  • Prevents encrypted data from one island component being replayed against a different island component.

    6.1.10release notessecurity advisory

  • Export resolution and hydration error handling are hardened for malformed component metadata.

    6.1.9release notes

  • The error overlay avoids unsafe HTML insertion, reducing security risks when displaying errors.

    6.1.9release notes

  • Server logging avoids unsafe format-string interpolation when handling error-related output.

    6.1.9release notes

  • The endpoint validates that the source is actually SVG before serving content as image/svg+xml.

    6.1.7release notes

  • Astro: XSS in define:vars via incomplete </script> tag sanitization

    6.1.6security advisory

  • Makes CSRF origin checking work in astro dev behind TLS-terminating reverse proxies and respects security settings in development.

    6.1.0release notes

  • Duplicate slashes in target paths are collapsed before URL parsing, preventing protocol-relative URL interpretation.

    6.0.8release notes

  • Style tags inside SVG components are correctly tracked when content security policy is enabled.

    6.0.5release notes

  • Server island POST endpoint validation now uses own-property checks for improved consistency.

    6.0.3release notes

  • clientAddress handling now correctly processes multiple header values and rejects values containing invalid IP-address characters.

    6.0.0release notes

  • Catch-all redirect parameters are hardened to prevent protocol-relative URLs in the Location header.

    6.0.0release notes

  • Internal and framing headers are no longer leaked or carried from the original response when rendering error pages.

    6.0.0release notes

  • Allowlists are now enforced when handling remote images.

    6.0.0release notes

  • Responsive images now work with security.csp by generating hashed build-time styles instead of runtime style elements.

    6.0.0release notes

  • The development server validates Sec-Fetch metadata headers to restrict cross-origin subresource requests.

    6.0.0release notes

  • Server island POST endpoints now enforce a configurable request body limit, defaulting to 1 MB.

    6.0.0release notes

  • Decoded backslashes are normalized consistently so middleware and the router see the same canonical pathname.

    6.0.0release notes

Deprecations 23

  • The static cookie consumption method is deprecated but remains for adapter compatibility.

    6.3.0release notes

  • The dev server warns when Vite 8 is hoisted at the project top level because Astro requires Vite 7.

    6.1.0release notes

  • The z export from astro:content is deprecated; import z separately from astro/zod.

    6.0.0upgrade guide

  • Deprecates astro:schema.

    6.0.0release notesupgrade guide

  • Deprecates exposed astro:transitions internals.

    6.0.0release notes

  • Deprecates Astro in getStaticPaths().

    6.0.0release notes

  • Adapter authors can use createApp() from astro/app/entrypoint in place of NodeApp.

    6.0.0upgrade guide

  • Deprecates createExports() in the Adapter API.

    6.0.0release notes

  • The adapter feature edgeMiddleware is deprecated and should be replaced with middlewareMode.

    6.0.0release notes

  • Deprecates import.meta.env.ASSETS_PREFIX.

    6.0.0release notesupgrade guide

  • Deprecates loadApp() from astro/app/node.

    6.0.0release notes

  • The astro/app/node loadApp() utility is deprecated; replace it with createApp().

    6.0.0upgrade guide

  • Deprecates loadManifest() from astro/app/node.

    6.0.0release notesupgrade guide

  • Deprecates NodeApp from astro/app/node.

    6.0.0release notes

  • NodeApp is deprecated for adapters in favor of createApp(), createRequest(), and writeResponse(); NodeAppHeadersJson is also deprecated.

    6.0.0upgrade guide

  • The NodeAppHeadersJson type is deprecated as part of the adapter API transition away from NodeApp.

    6.0.0upgrade guide

  • The session driver string signature and options configured directly under session are deprecated in favor of a new object shape using sessionDrivers.

    6.0.0upgrade guide

  • Deprecates the string signature for session drivers.

    6.0.0release notes

  • Specifying a session driver as a string is deprecated in favor of the driver object shape.

    6.0.0release notes

  • The explicit entrypoint resolution mode that preserves Astro 5.x adapter behavior is deprecated; adapters should use entrypointResolution: "auto" and remove exports and args.

    6.0.0upgrade guide

  • CSP and Shiki syntax highlighting are incompatible because Shiki uses inline styles; Astro now warns when both are enabled.

    6.0.0release notes

  • Deprecates start() in the Adapter API.

    6.0.0release notes

  • Deprecates z from astro:content in favor of astro/zod.

    6.0.0release notes

New APIs and options 51

  • Allows projects to replace the default unified Markdown processor with an alternative processor.

    6.4.0release notes

  • Adapters can preserve the dist/server/ directory structure for static builds, matching preserveBuildClientDir.

    6.4.0release notes

  • The satteri() processor can be imported and configured as an alternative Markdown processor.

    6.4.0release notes

  • Adds an interface for typing custom context providers on Astro and ctx.

    6.3.4release notes

  • Adds fetchFile to customize or disable the advanced routing entrypoint file.

    6.3.4release notes

  • Adds a type export for typing the advanced routing entrypoint.

    6.3.4release notes

  • Adds response, automatically set after pages() or middleware() completes.

    6.3.4release notes

  • Provides a low-level Fetch-based API for composing Astro request handlers.

    6.3.0release notes

  • Adds an AstroCookies instance method that marks cookies consumed and returns Set-Cookie header values.

    6.3.0release notes

  • Enables custom control over Astro's server request handling pipeline through a project entrypoint.

    6.3.0release notes

  • Becomes the entrypoint for all server-rendered requests when advanced routing is enabled.

    6.3.0release notes

  • Supports the jsx value, which strips whitespace using JSX rules instead of the default HTML compression strategy.

    6.2.0release notes

  • The new astro:assets helper resolves font file URLs from fontData, simplifying font access during development and prerendering.

    6.2.0release notes

  • Experimental configurable log handlers let users replace default console output with built-in or custom logging implementations.

    6.2.0release notes

  • Enables automatic optimization of imported SVG components for smaller file sizes and better performance.

    6.2.0release notes

  • Adapters can forward runtime background-task hooks to Astro, allowing cache providers to perform work such as stale-while-revalidate without blocking responses.

    6.2.0release notes

  • Exposes i18n fallback routes through IntegrationResolvedRoute for integrations using the astro:routes:resolved hook.

    6.1.0release notes

  • Supports codec-specific Sharp encoder defaults for compile-time image generation, while per-image quality still takes precedence.

    6.1.0release notes

  • Accepts an options object for fine-tuning punctuation, dash, ellipsis, and quote transformations in Markdown.

    6.1.0release notes

  • Adapters can collect prerenderable paths from within a target runtime using the new virtual module.

    6.0.0release notes

  • The Node standalone adapter can limit request body size in bytes; the default is 1 GB and 0 disables the limit.

    6.0.0release notes

  • CacheLike exposes whether caching is active, allowing libraries to avoid conditional try/catch logic.

    6.0.0release notes

  • Purges cached entries by tag or path.

    6.0.0release notes

  • The <Code /> component can highlight embedded languages in addition to its primary language.

    6.0.0release notes

  • Live content collection loaders now receive the collection name in their parameters.

    6.0.0release notes

  • Adapter createApp() accepts streaming, enabled by default, allowing adapters to disable HTML streaming when required.

    6.0.0release notes

  • Middleware and adapters can explicitly provide the client IP address to request context.

    6.0.0release notes

  • Adds createSchema() as the equivalent replacement for function-based dynamic schemas in content loaders.

    6.0.0release notes

  • Integration authors can emit assets that move to the client directory during SSR builds.

    6.0.0release notes

  • Enables experimental route caching by configuring a cache provider for on-demand rendered responses.

    6.0.0release notes

  • Queued rendering can cache node values during rendering for reuse.

    6.0.0release notes

  • Projects can opt into a queue-based rendering engine with potential speed and memory improvements.

    6.0.0release notes

  • Queued rendering can reuse a configurable pool of nodes during static page rendering.

    6.0.0release notes

  • Defines default route cache options declaratively, with per-route cache settings able to override them.

    6.0.0release notes

  • Projects can opt into an experimental Rust-based Astro compiler with faster builds and stricter HTML handling.

    6.0.0release notes

  • The Fonts API can load fonts from installed NPM packages or a CDN through the new provider.

    6.0.0release notes

  • Astro adds a first-party Fonts API supporting local fonts and built-in providers with optimization features.

    6.0.0release notes

  • Image services can override remote image metadata retrieval for caching or provider-specific dimension APIs.

    6.0.0release notes

  • This migration flag restores v5 legacy content collection behavior, including automatic loaders, legacy config locations, entry APIs, and path-based IDs.

    6.0.0release notes

  • This temporary migration flag preserves some legacy v4 content collections features while projects migrate to the Content Layer API.

    6.0.0upgrade guide

  • Content collections can fetch data at runtime through live loaders without rebuilding the site.

    6.0.0release notes

  • Provides a built-in in-memory LRU runtime cache provider with invalidation, stale-while-revalidate, and query filtering support.

    6.0.0release notes

  • Configures whether conflicting prerendered routes error, warn, or silently choose the highest-priority route.

    6.0.0release notes

  • Adapters can preserve client/server directory structure for static builds by opting into this feature.

    6.0.0release notes

  • Content loaders can resolve relative Markdown image paths and populate metadata.localImagePaths.

    6.0.0release notes

  • renderMarkdown() extracts frontmatter into metadata.frontmatter and excludes it from the HTML output.

    6.0.0release notes

  • Astro Actions request bodies can be configured above the default 1 MB limit.

    5.18.0, 6.0.0release notesrelease notes

  • Adapters using entryType: 'self' can specify a custom server entrypoint.

    6.0.0release notes

  • Adapters can provide custom prerendering logic through the astro:build:start hook.

    6.0.0release notes

  • The default Sharp image service can convert SVGs to raster formats such as PNG and WebP.

    6.0.0release notes

  • Adapter authors can use writeResponse() to write responses with the createApp-based adapter API.

    6.0.0upgrade guide

Performance 8

  • SSR manifests omit inline CSS for prerendered routes, reducing SSR entry size and cold-start parse time.

    6.2.2release notes

  • Requests without a session cookie no longer initialize storage or perform guaranteed-miss reads.

    6.2.2release notes

  • The dev server caches internal dependency crawling, slightly improving development-server performance.

    6.1.8release notes

  • Server rendering performance for .astro components improves by up to 2x, especially for component-heavy or text-heavy pages.

    6.0.0release notes

  • Astro's installation size is reduced by around 8 MB.

    5.16.7, 6.0.0release notesrelease notes

  • Build memory usage is reduced by filtering routes per environment so each environment builds only the pages it needs.

    6.0.0release notes

  • Returns a cached highlighter based on Shiki options instead of creating a new instance every time.

    6.0.0release notes

  • SSR renderers are no longer bundled when only API endpoints are dynamic.

    6.0.0release notes

Behavior and default changes 14

  • The static preview server is skipped when an adapter supplies previewEntrypoint, allowing the adapter to handle static and dynamic routes.

    6.4.0release notes

  • New Cloudflare projects use today’s date for compatibility_date instead of resolving it from locally installed packages.

    6.1.5release notes

  • The client router skips its animations when the browser already provides a visual transition, such as a swipe gesture.

    6.1.0release notes

  • The command uses the latest valid compatibility_date in the Wrangler configuration when available.

    6.0.0release notes

  • Astro.csp can be undefined when CSP is not enabled, and its methods no longer throw.

    6.0.0release notes

  • Content collection loaders can now use await import() and import.meta.glob() during build.

    6.0.0release notes

  • context.csp can be undefined when CSP is not enabled, and its methods no longer throw.

    6.0.0release notes

  • Astro’s <Image> output no longer emits redundant fetchpriority="auto" attributes by default.

    6.0.0release notes

  • The Node version requirement is lowered to support running on Stackblitz until it supports v22.

    6.0.0release notes

  • Changes how styles for responsive images are emitted.

    6.0.0release notes

  • Content loader schema types are inferred instead of generated.

    6.0.0release notes

  • session.driver is optional because adapters can provide default session drivers.

    6.0.0release notes

  • SSR builds now move only actual client assets, leaving server-side modules such as .sql files in place.

    6.0.0release notes

  • Astro uses Vite’s Environments API to manage client, server, and prerender runtime environments, affecting integration and adapter APIs.

    6.0.0upgrade guide

Tooling 5

  • Generates a Wrangler configuration file with a JSON schema.

    6.4.7release notes

  • Build-time printing is improved when builds take longer than 60 seconds.

    6.3.6release notes

  • The welcome message now highlights the graceful dev/preview server quit command instead of the kill process shortcut.

    6.0.6release notes

  • The command now configures Cloudflare types and adds a generate-types package script.

    6.0.0release notes

  • Changes the required or supported TypeScript configuration.

    6.0.0release notes

Fixes and other changes 194

  • Improves diagnostics emitted when Astro parses incorrect .astro files.

    6.4.7release notes

  • Prevents CSS from client:only islands leaking to unrelated pages.

    6.4.7release notes

  • Honors compressHTML when joining head elements.

    6.4.7release notes

  • Restores support for numeric IDs in YAML frontmatter references.

    6.4.7release notes

  • Iteratively decodes multi-level percent-encoding before middleware and route matching instead of rejecting such URLs with 400.

    6.4.7release notes

  • Strips trailing slashes when trailingSlash: 'never' is configured.

    6.4.7release notes

  • Updates inline style tags in server-rendered HTML after CSS files change during development.

    6.4.7release notes

  • Prevents prerendered redirect targets from being bundled into the SSR function in hybrid mode, reducing bundle size inflation.

    6.4.7release notes

  • Preserves children's slot attributes on custom elements in MDX for correct Shadow DOM named slot distribution.

    6.4.7release notes

  • Triggers HMR for files inside src/middleware/ during development.

    6.4.7release notes

  • Renaming an image while the dev server runs now hot-reloads correctly without triggering a build error or crashing.

    6.4.6release notes

  • The logger destination now applies to the “Server listening on...” startup message because the logger resolves before the server starts listening.

    6.4.5release notes

  • Runtime detection was reverted to avoid a significant build-time regression for Cloudflare adapter users with large prerendered sites.

    6.4.5release notes

  • App.match() no longer throws when request paths contain an invalid percent-sequence.

    6.4.4release notes

  • Astro.currentLocale now returns the mapped domain's locale on dynamic routes instead of the default locale.

    6.4.4release notes

  • Astro.routePattern now preserves the original casing of dynamic parameter names from filenames.

    6.4.4release notes

  • Dynamic routes no longer return a 500 Missing parameter error when using domain-based i18n routing in SSR.

    6.4.4release notes

  • Dynamic routes no longer return [object Object] instead of the expected content in certain runtimes.

    6.4.4release notes

  • Editing client-side components during development no longer causes an unnecessary full backend program reload.

    6.4.4release notes

  • Static file endpoints with .html in dynamic parameter values no longer fail with NoMatchingStaticPathFound during build.

    6.4.4release notes

  • Removes a false middleware warning when astro() is used in a custom src/app.ts and the first request is a redirect route.

    6.4.3release notes

  • Prevents false accessibility warnings for anchors inside closed details elements.

    6.4.3release notes

  • Unmatched routes with astro/hono handlers now render the custom 404 page instead of throwing a TypeError.

    6.4.3release notes

  • Improves optimized fallback generation for bold font variants by using better metrics.

    6.4.3release notes

  • Restores redirectToDefaultLocale functionality after the Advanced Routing refactoring.

    6.4.3release notes

  • Fixes a plugins is not iterable crash when pre-6.0 @astrojs/mdx is used alongside integrations configuring rehype plugins.

    6.4.2release notes

  • Fixes a plugins is not iterable crash when pre-6.0 @astrojs/mdx is used alongside integrations configuring remark plugins.

    6.4.2release notes

  • Fixes a plugins is not iterable crash when pre-6.0 @astrojs/mdx is used alongside integrations configuring remark-rehype plugins.

    6.4.2release notes

  • SSR dynamic routes no longer return 404 when a matching prerendered dynamic route is sorted first and cannot serve the request.

    6.4.2release notes

  • Fixes a dev-mode race condition where the Vite dependency optimizer could lose React dependencies.

    6.4.0release notes

  • Internal routes such as server islands are exempt from getStaticPaths validation, fixing server-island rendering on static sites.

    6.4.0release notes

  • Static preview now serves files from build.client when the adapter requires preserveBuildClientDir.

    6.4.0release notes

  • Preview now accounts for SSR routes discovered during route scanning instead of always using the static preview server.

    6.4.0release notes

  • Forwarded host and protocol headers set by a custom src/app.ts fetch handler are now respected before FetchState creation.

    6.4.0release notes

  • Dynamically imported JavaScript chunks no longer return 404s when adapters use assetQueryParams.

    6.3.8release notes

  • Production builds now include CSS for conditionally rendered Svelte components.

    6.3.8release notes

  • Scoped styles from Astro components rendered through MDX named slots are now retained.

    6.3.8release notes

  • A false-positive warning is no longer logged on every SSR request for dynamic routes.

    6.3.8release notes

  • The astro:i18n module can again be imported from client script blocks after a v6 regression.

    6.3.7release notes

  • Hyphenated custom elements in MDX now use registered renderers during SSR, falling back to raw HTML when unclaimed.

    6.3.7release notes

  • Dynamic routes no longer return 400 Bad Request when URLs contain a literal percent character.

    6.3.7release notes

  • Node adapter now passes Buffer, Uint8Array, and ArrayBuffer request bodies through directly instead of JSON-stringifying them.

    6.3.7release notes

  • The minify option is now forwarded to client-side builds, unless a client environment override takes priority.

    6.3.7release notes

  • Rollup output options are now forwarded to client-side builds, unless client environment overrides take priority.

    6.3.7release notes

  • The sourcemap option is now forwarded to client-side builds, unless a client environment override takes priority.

    6.3.7release notes

  • Empty markdown image alt text is preserved as alt="" in rendered HTML, supporting accessible decorative images.

    6.3.6release notes

  • HMR no longer serves stale content for dynamically imported components routed through barrel files.

    6.3.6release notes

  • The file content loader now generates valid JSON Schema for collections whose JSON or YAML data is a top-level array.

    6.3.6release notes

  • HMR no longer serves stale content when components are passed as props through getStaticPaths().

    6.3.6release notes

  • Remote SVG sources pass through correctly without enabling dangerouslyProcessSVG or explicitly setting format="svg".

    6.3.6release notes

  • The dev server now serves fresh content after SSR-only modules change, including external monorepo files and dynamically imported components.

    6.3.5release notes

  • Actions and other SSR POST endpoints continue working in dev instead of returning HTTP 500 errors.

    6.3.4release notes

  • Fixes Hono cache middleware to follow the standard wrapper pattern.

    6.3.4release notes

  • Map and Set instances saved in a content collection are no longer broken when entries are retrieved.

    6.3.4release notes

  • Fixes entry.data type inference for live collections configured without a schema.

    6.3.4release notes

  • Styles are now extracted to head in the dev server for the specified Cloudflare prerender setup.

    6.3.4release notes

  • SVG images with width or height zero are treated as valid dimensions instead of throwing NoImageMetadata.

    6.3.4release notes

  • assetsPrefix is available on build from astro:config/server.

    6.3.2release notes

  • Compiler memory is correctly freed at the end of the build.

    6.3.2release notes

  • Astro.cache is always defined as a no-op shim when experimental.cache is not configured, allowing cache methods to be called without conditional checks.

    6.3.2release notes

  • Prevents HTMLElement is not defined errors during HMR for components with client-side scripts.

    6.3.2release notes

  • The dev image endpoint origin check is corrected.

    6.3.2release notes

  • Ampersands in meta tags no longer appear as raw entity strings in link previews or raw HTML.

    6.3.2release notes

  • Non-prerendered routes no longer fail when a dynamic prerendered route exists with prerenderEnvironment set to node.

    6.3.2release notes

  • Validation messages now better explain incorrect placement of script-src or style-src in the directives array.

    6.3.2release notes

  • Local images no longer return 404 on non-prerendered pages when using the generic image endpoint.

    6.3.1release notes

  • Hydration import failures now support retry and error event handling for transient network failures.

    6.3.0release notes

  • Locale selection now respects the first matching code in configured locales order.

    6.3.0release notes

  • Boolean arrays now correctly parse submitted "false" strings as false.

    6.3.0release notes

  • Deleted content collection entries no longer persist in development results.

    6.3.0release notes

  • CSP directives are no longer duplicated when inserted or merged.

    6.3.0release notes

  • SSR responses in astro dev no longer crash because logger.flush is unavailable.

    6.3.0release notes

  • Builds no longer crash when processing animated AVIF images.

    6.2.2release notes

  • Conditional named slot callbacks no longer receive unintended arguments.

    6.2.2release notes

  • Tap prefetching now triggers when clicking nested elements inside an anchor.

    6.2.2release notes

  • LiveLoader data types declared as interfaces are now accepted.

    6.2.2release notes

  • Dynamic parameters on non-page routes now preserve .html values for endpoints and redirects.

    6.2.2release notes

  • Dev rendering now propagates head metadata for adapters using the prerender Vite environment.

    6.2.2release notes

  • Fallback pages using rewrite mode now emit their page bodies during astro build.

    6.2.2release notes

  • The index route now resolves correctly with a custom base path and trailingSlash: 'never'.

    6.2.2release notes

  • Partial pages imported as components now contribute their CSS styles.

    6.2.2release notes

  • The position prop on Image and Picture components now correctly applies object-position styles.

    6.2.2release notes

  • Script deduplication state is no longer consumed while rendering inert template contexts.

    6.2.2release notes

  • Deleting a session key as the first request mutation now persists correctly.

    6.2.2release notes

  • Astro component imports through tsconfig path aliases no longer cause style compilation failures.

    6.2.2release notes

  • Scoped styles now target the correct element with Lightning CSS and nested selectors inside :where(...).

    6.2.2release notes

  • Error formatting is now compatible with Zod 4.4.0.

    6.2.1release notes

  • Config validation now correctly handles omitted integrations fields with newer Zod versions.

    6.2.1release notes

  • Config validation no longer warns when the optional server property is missing.

    6.2.1release notes

  • The server config property is now compatible with Zod 4.4.0.

    6.2.1release notes

  • Scripts inside <template> elements are no longer deduplicated.

    6.2.0release notes

  • Stops a spurious content configuration warning for projects that do not use content collections.

    6.1.10release notes

  • Prevents a spurious dev toolbar sourcemap 404 caused by browser resolution from the /@id/ URL prefix.

    6.1.10release notes

  • allowedDomains settings are correctly propagated when using the development server.

    6.1.8release notes

  • Build output filenames no longer contain special characters that can cause deployment failures on platforms like Netlify.

    6.1.8release notes

  • Build errors are fixed for inter-chunk JavaScript using dynamic imports on platforms with skew protection enabled.

    6.1.8release notes

  • Client-build asset hashes are no longer regenerated unnecessarily, making builds more stable.

    6.1.8release notes

  • Vue scoped style handling improves in development mode during client router navigation.

    6.1.8release notes

  • Remote image dimensions are now validated during static builds on Netlify.

    6.1.7release notes

  • Actions no longer fail with ActionsWithoutServerOutputError when output is static and an adapter is configured.

    6.1.6release notes

  • Inline script content now handles special characters more reliably.

    6.1.6release notes

  • SCSS and CSS module changes now hot-update styles in place during development instead of triggering a full page reload.

    6.1.6release notes

  • Sync content inside Fragment now streams without waiting for all async sibling expressions to resolve.

    6.1.5release notes

  • Fixes a build error when a pre-rendered page uses Picture and another page renders content collection entries.

    6.1.5release notes

  • Revives UnoCSS in dev mode when used with the client router.

    6.1.5release notes

  • Config changes in dev mode now restart Vite in place, preventing miniflare errors and 404 responses.

    6.1.4release notes

  • Pages with dots in their filenames no longer return 404 with trailing slashes in dev mode and respect the configured trailing slash behavior.

    6.1.4release notes

  • Static builds no longer produce redirect HTML instead of the actual response for extensionless endpoints when trailing slashes are always enabled.

    6.1.4release notes

  • Prevents HTML content from being incorrectly escaped as plain text when rendering MDX components through AstroContainer APIs.

    6.1.3release notes

  • Fixes dev rendering so head metadata is present and dev CSS/scripts are injected in the correct place.

    6.1.3release notes

  • Prevents page-level CSS from leaking between unrelated pages across top-level route boundaries.

    6.1.3release notes

  • Restores HMR when modifying files with the Cloudflare adapter and prerenderEnvironment set to 'node'.

    6.1.3release notes

  • Appends skew protection query parameters to inter-chunk JavaScript imports, preventing version mismatches during Vercel rolling deployments.

    6.1.3release notes

  • Allows SSR builds to succeed when projects contain only injected routes and no src/pages/ directory.

    6.1.3release notes

  • Catch-all routes no longer incorrectly intercept static asset requests with the @astrojs/node adapter in middleware mode.

    6.1.2release notes

  • Zod v4 validation errors now display human-readable messages instead of raw JSON.

    6.1.2release notes

  • astro preview now respects vite.preview.allowedHosts configured in astro.config.mjs.

    6.1.2release notes

  • Fixes Vue's :deep() notation being ignored by the client router in dev mode.

    6.1.1release notes

  • Prevents the dev toolbar audit from crashing when encountering the image ARIA role.

    6.1.1release notes

  • Automatically adds a Vite 7 override to package.json to prevent a require_dist crash caused by a Vite version split.

    6.1.0release notes

  • Prevents Rollup build failures when astro:config/client is used inside a script tag.

    6.1.0release notes

  • Allows cached assets to revalidate correctly when redirect checks encounter Not Modified responses.

    6.1.0release notes

  • Prevents duplicate client:component-path attributes from being added to client:only components in MDX.

    6.1.0release notes

  • Removes the unsupported emitFile warning during astro dev when integrations inject before-hydration scripts.

    6.1.0release notes

  • Stops queued rendering from escaping HTML page output so .html pages render as HTML instead of plain text.

    6.1.0release notes

  • Prevents font files from being copied several times unnecessarily during the build.

    6.1.0release notes

  • Prevents invalid development URLs for font families using an oblique style with angles.

    6.1.0release notes

  • Corrects the audit toolbar so the image role is not reported incorrectly.

    6.1.0release notes

  • Corrects the dev toolbar accessibility audit so menuitemradio is recognized as an interactive ARIA role.

    6.1.0release notes

  • Development server changes to middleware are now picked up without requiring a full restart.

    6.1.0release notes

  • Prevents an Astro Cloudflare dev server crash when navigating to a deferred server island after a page without one.

    6.1.0release notes

  • Correctly renders Zod metadata on the top-level schema when converting it to JSON Schema.

    6.1.0release notes

  • Nested object properties now work correctly, including with zod functions such as superRefine and discriminatedUnion.

    6.0.8release notes

  • The dev server no longer hangs on the first request when using the Cloudflare adapter.

    6.0.8release notes

  • Astro.currentLocale now resolves the actual locale for dynamic locale routes instead of always returning the default locale.

    6.0.7release notes

  • Styles from dynamically imported components are injected on the first dev server load.

    6.0.7release notes

  • URLs with locales that are not configured now render the custom 404 page instead of a dynamic locale page.

    6.0.7release notes

  • Static-page requests passed to Express or Fastify no longer leak socket listeners before next() is called.

    6.0.7release notes

  • Cloudflare dev server islands work with prerenderEnvironment set to node.

    6.0.7release notes

  • Images in markdown processed by custom content loaders are resolved and optimized correctly.

    6.0.7release notes

  • Server islands no longer fail at runtime in projects with multiple frontend integrations when all pages are prerendered.

    6.0.7release notes

  • HMR now correctly handles adding, changing, and deleting routes in pages/ on Windows.

    6.0.6release notes

  • Type inference is fixed for content collections using a loader that includes a schema.

    6.0.6release notes

  • Client hydration now works for components imported through Node.js subpath imports, including Cloudflare adapter development.

    6.0.6release notes

  • Skew protection query parameters are applied to island hydration URLs and safely appended to asset URLs with existing search or hash parts.

    6.0.6release notes

  • SSR dynamic routes using an .html extension now work correctly.

    6.0.6release notes

  • Style-only changes now trigger eager recompilation to prevent stale slot rendering during HMR.

    6.0.6release notes

  • Validation now checks resolved routes, preventing startup failures with static output and at least one non-prerendered page or endpoint.

    6.0.5release notes

  • The shared Vite watcher listener limit is increased to avoid MaxListenersExceededWarning during development startup.

    6.0.5release notes

  • The root page pathname uses /index.html with build.format: "file" instead of /.html during builds.

    6.0.5release notes

  • The before-hydration script chunk is emitted for the client Vite environment, preventing 404s and restoring hydration for integrations using injectScript.

    6.0.5release notes

  • JSON schema generation now handles content collection schemas whose input and output shapes differ.

    6.0.5release notes

  • Custom prerenderers are always torn down during builds, including when getStaticPaths() throws.

    6.0.5release notes

  • Server island requests are treated as prerender-handler eligible, allowing deferred island content to load for node-prerendered pages.

    6.0.5release notes

  • Deferred islands no longer fail at runtime in prerendered pages for affected adapters, including Cloudflare.

    6.0.5release notes

  • The server entrypoint no longer leaks into the client environment, preventing adapter warnings during builds.

    6.0.5release notes

  • Prebundled in dev when custom toolbar apps are registered, preventing re-optimization reloads that can hide or break the toolbar.

    6.0.4release notes

  • Newly created pages in the dev server now receive layout-imported CSS without requiring a restart.

    6.0.4release notes

  • The dev server now serves a page when a project-root directory shares the page route's name.

    6.0.4release notes

  • Removes an incorrect warning when using prefetchAll.

    6.0.4release notes

  • Now produces an absolute path instead of a protocol-relative URL when base is '/'.

    6.0.4release notes

  • Server islands now work in prerendered pages when output is configured as server.

    6.0.4release notes

  • Unknown file extension errors now recommend the correct Vite 7 configuration key.

    6.0.4release notes

  • Routes emitted by the astro:build:done hook now have the distURL array correctly populated.

    6.0.3release notes

  • Prerendered routes now handle route and CSS updates, prerender middleware, route matching, and HMR consistently in Astro's dev environment.

    6.0.3release notes

  • Fixes return; syntax not working correctly in Astro frontmatter in certain contexts.

    6.0.2release notes

  • The tsconfig preview now shows the actual pending changes before confirmation.

    6.0.1release notes

  • Supports more operating systems when copying diagnostic information to the clipboard.

    6.0.0release notes

  • The astro:page-load event now fires on initial page loads.

    6.0.0release notes

  • Rewriting to URLs containing non-ASCII characters no longer incorrectly returns 404.

    6.0.0release notes

  • Framework components in multiple named MDX slots now receive their hydration scripts correctly.

    5.16.9, 6.0.0release notesrelease notes

  • build.serverEntry is respected when using the new Adapter API and works as expected again.

    6.0.0release notes

  • ClientRouter navigation preserves inline styles and font preload links, preventing font flashes caused by re-evaluated @font-face declarations.

    6.0.0release notes

  • ClientRouter preserves the target URL's original hash during server-side redirects.

    5.16.7, 6.0.0release notesrelease notes

  • Using the Code component no longer produces an unexpected error.

    6.0.0release notes

  • context.csp no longer logs warnings during development; those warnings are logged only in production.

    6.0.0release notes

  • The exported createApp types from astro/app/entrypoint are corrected.

    6.0.0release notes

  • CSP headers are no longer incorrectly injected by the development server.

    6.0.0release notes

  • Newly added pages are correctly shown and served while the development server is running.

    6.0.0release notes

  • Dynamic URL attribute values containing & are now consistently escaped.

    6.0.0release notes

  • poolSize can now be configured as 0.

    6.0.0release notes

  • Form actions from the original request are no longer executed while rendering error pages.

    6.0.0release notes

  • Rendering now preserves the hidden="until-found" attribute value.

    6.0.0release notes

  • Host header handling is improved for SSR deployments behind proxies.

    5.17.2, 6.0.0release notesrelease notes

  • Images now work in development when setups use port forwarding.

    5.16.7, 6.0.0release notesrelease notes

  • inferSize is no longer retained as an HTML attribute on emitted img elements for non-remote images.

    6.0.0release notes

  • Integration-injected scripts now load in the dev server with non-runnable environment adapters such as @astrojs/cloudflare.

    6.0.0release notes

  • JSON schema generation no longer fails for unrepresentable types.

    6.0.0release notes

  • The Picture component avoids creating unused images during builds.

    6.0.0release notes

  • Public files now take priority over generated API routes in both development and production builds.

    6.0.0release notes

  • Script tags from components passed as slots to server islands are now included in the response.

    6.0.0release notes

  • Regenerated session data is now saved under the new session ID without requiring an additional set() call.

    6.0.0release notes

  • Adding or removing style tags in Astro components now updates styles visually during development without restarting the server.

    6.0.0release notes

  • Setting vite.server.allowedHosts to true no longer produces an invalid array.

    6.0.0release notes

astro 5197 changes

Breaking changes 58

  • Remote image redirects are now rejected.

    5.17.3release notes

  • The experimental Fonts API no longer exports getFontBuffer due to significant memory usage during build.

    5.17.1release notes

  • Local fonts must now use the unified provider API with fontProviders.local() and move variants into options.

    5.16.14release notes

  • A fontData object replaces getFontData() for accessing font data by CSS variable and supports programmatic access to all font data.

    5.16.12release notes

  • Google and Google Icons family-specific options must now be configured on each font entry through the options property.

    5.16.12release notes

  • The experimental Fonts API no longer exports getFontData from astro:assets.

    5.16.12release notes

  • Changes the experimental FontProvider implementation and requires third-party unifont providers to wrap their runtime provider.

    5.16.9release notes

  • The experimental Fonts API removes defineAstroFontProvider(); custom font providers should use the FontProvider type instead.

    5.16.7release notes

  • Using output: "hybrid" now produces a helpful error explaining the option was removed and recommending output: "static".

    5.16.5release notes

  • The experimental Fonts API now defaults to only the latin subset; extra subsets must be selected manually.

    5.16.0release notes

  • Data URIs now require explicit authorization through a remote pattern configuration.

    5.15.9release notes

  • The passthrough image service no longer generates WebP output.

    5.15.9release notes

  • Malformed cookies now return the raw unparsed value instead of throwing a URIError.

    5.14.7release notes

  • Live loader cacheHint objects no longer support maxAge; set page max age through headers instead.

    5.14.6release notes

  • Action form submissions now use _action instead of _astroAction as the generated URL query parameter.

    5.0.0release notes

  • The second argument is now a renderOptions object, supporting addCookieHeader, clientAddress, locals, and routeData for customizing rendering.

    5.0.0release notes

  • Action form requests now render results as standard POST results without cookie forwarding, removing the 4 KB limit but causing a form-resubmission prompt on refresh.

    5.0.0release notes

  • The command now updates the configuration file differently and adds @astrojs/vercel as an imported module; this requires version 8 of the integration.

    5.0.0release notes

  • Adding an adapter no longer automatically sets output: 'server'.

    5.0.0release notes

  • The hook’s routes type is now IntegrationRouteData, a subset of RouteData without isIndex and fallbackRoutes.

    5.0.0release notes

  • The hook’s entryPoint type is now IntegrationRouteData, a subset of RouteData without isIndex and fallbackRoutes.

    5.0.0release notes

  • Locally linked dependencies are no longer processed by Vite when loading Astro config; they are imported by Node.js like other dependencies.

    5.0.0release notes

  • Using astro:content in the client is now an error, preventing content from being bundled in the client and potentially exposing secrets.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • This export was removed as Astro’s internal JSX handling moved to @astrojs/mdx.

    5.0.0release notes

  • Astro.rewrite() now reports an error when rewriting an on-demand route to a static route with server output, which cannot be retrieved at runtime.

    5.0.0release notes

  • The option now resolves relative to outDir, fixing nested output paths that previously included an unintended extra dist directory.

    5.0.0release notes

  • The option now resolves relative to outDir, fixing nested output paths that previously included an unintended extra dist directory.

    5.0.0release notes

  • The cacheManifest boolean argument is no longer passed to the astro:build:done integration hook.

    5.0.0release notes

  • The Markdown content property is now an async function, so callers must await its result.

    5.0.0release notes

  • TypeScript now reports errors when related configuration options have inconsistent types, such as a default locale not included in the supported locales.

    5.0.0release notes

  • The experimental contentCollectionsCache flag is removed; projects using it must remove it from Astro config.

    5.0.0release notes

  • The experimental.directRenderScript option is removed because direct script rendering is now the default.

    5.0.0release notes

  • Support for the option was removed from Astro and @astrojs/vercel.

    5.0.0release notes

  • Route prioritization now uses the same logic for injected routes, file-based routes, and redirects, and the feature is enabled by default.

    5.0.0release notes

  • In content layer schemas, image paths beginning with a slash are treated as project-relative rather than public URLs.

    5.0.0release notes

  • Legacy content and data collections without a loader now use the Content Layer API glob() loader by default, with compatibility handling and some behavioral limitations.

    5.0.0release notes

  • Legacy content types are no longer generated for content layer collections located in the content directory.

    5.0.0release notes

  • Middleware, API endpoints, and pages can no longer replace the entire locals object; they can still append values to the existing object.

    5.0.0release notes

  • Markdown pages without the special layout frontmatter property now receive a <meta charset="utf-8"> tag instead of a charset=utf-8 Content-Type header.

    5.0.0release notes

  • The Shiki postprocess hook no longer runs on code blocks in .md and .mdx files; transformers using it may need updating.

    5.0.0release notes

  • Node.js 21 is no longer supported.

    5.0.0release notes

  • Astro now requires Node v18.17.1 or higher.

    5.0.0release notes

  • Boolean values on non-boolean HTML attributes now render explicitly as ="true" or ="false" instead of omitting values.

    5.0.0release notes

  • The hybrid output value no longer exists. static now supports opting individual routes out of prerendering with export const prerender = false.

    5.0.0release notes

  • Pagination URLs now include the configured base value, so remove any manual base prefix from previous and next URLs.

    5.0.0release notes

  • params passed in getStaticPaths are no longer automatically decoded; use decodeURI manually if decoding is needed.

    5.0.0release notes

  • The field is now undefined or an array of URL values, reflecting that a route can generate multiple files on disk.

    5.0.0release notes

  • Scripts now render directly where declared instead of being hoisted to the head or bundled together. They can be conditionally rendered, and this prevents execution on pages where they are unused.

    5.0.0release notes

  • Origin checking is enabled by default for pages rendered on demand, providing CSRF protection; set it to false to opt out.

    5.0.0release notes

  • Support for the Squoosh image service was removed; the release recommends the built-in Sharp image service instead.

    5.0.0release notes

  • The assets property was removed for adapters; sharpImageService is now the single property for determining compatibility with the built-in Sharp image service.

    5.0.0release notes

  • Astro’s headings metadata for Remark and Rehype plugins moved from vfile.data.__astroHeadings to vfile.data.astro.headings.

    5.0.0release notes

  • Image path metadata moved from vfile.data.imagePaths to vfile.data.astro.imagePaths, and its type changed from Set<string> to string[].

    5.0.0release notes

Security 14

  • Astro: Remote allowlist bypass via unanchored matchPathname wildcard

    5.18.1security advisory

  • Fixes protocol validation when allowedDomains includes both protocol and hostname fields.

    5.18.0release notes

  • Image allowlists are now respected when remote image sizes are inferred.

    5.17.3release notes

  • Certain unauthorized links are no longer rendered as clickable in the error overlay.

    5.16.16release notes

  • Server island requests now carry an encrypted component export identifier to prevent resolving to the wrong component.

    5.16.16release notes

  • CSP resources from configuration and the runtime API are combined into grammatically correct, deduplicated CSP headers.

    5.16.4release notes

  • Middleware validates decoded pathnames to prevent authentication bypass through multi-level URL encoding.

    5.16.3release notes

  • Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint

    5.15.9security advisory

  • Astro vulnerable to reflected XSS via the server islands feature

    5.15.8security advisory

  • Middleware receives normalized, decoded pathname values so URL-encoded paths cannot bypass checks.

    5.15.8release notessecurity advisorysecurity advisory

  • Slots are encrypted before browser transmission, improving integrity and preventing injection attacks.

    5.15.8release notes

  • Astro development server error page is vulnerable to reflected Cross-site Scripting

    5.15.6security advisory

  • Validates forwarded headers against allowedDomains patterns to prevent cache poisoning and header injection attacks.

    5.15.5release notessecurity advisory

  • Fixes a leak of server runtime code into client bundles when importing SVG files in client-side code.

    5.15.2release notes

Deprecations 5

  • Astro.glob is now correctly marked as deprecated.

    5.16.1release notes

  • The routes array is deprecated; route properties are available from astro:routes:resolved, and the new assets map provides distURL values.

    5.0.0release notes

  • Deprecated in favor of Content Collections for Markdown and MDX, or import.meta.glob for querying project source files.

    5.0.0release notes

  • ClientRouter replaces ViewTransitions as the component name; the old name continues to work in Astro 5.x and will be removed in 6.0.

    5.0.0release notes

  • The old component name continues to work in Astro 5.x but will be removed in 6.0; use ClientRouter instead.

    5.0.0release notes

New APIs and options 45

  • Cookies can be created as partitioned cookies with partitioned: true; they must also use secure: true.

    5.17.0release notes

  • The dev toolbar position can be configured as bottom-left, bottom-center, or bottom-right.

    5.17.0release notes

  • The glob() loader can omit raw content bodies from the data store to reduce deployed data-store size.

    5.17.0release notes

  • The Image component and getImage() helper can flatten transparent images using a specified background color.

    5.17.0release notes

  • Sharp image resizing can use a configured kernel instead of the default lanczos3 algorithm.

    5.17.0release notes

  • Custom FontProvider init() contexts now expose a root URL for resolving local files.

    5.16.14release notes

  • Adds a helper to retrieve font file buffers from URLs returned by getFontData(), including during prerendering.

    5.16.13release notes

  • Experimental font providers can declare family-specific options through a generic, with options inferred in Astro configuration.

    5.16.12release notes

  • Adds Google Icons as a built-in font provider available through fontProviders.

    5.16.9release notes

  • The experimental Fonts API adds formats to specify which font formats to download.

    5.16.7release notes

  • Supports extending the type of props accepted by the getImage API.

    5.16.6release notes

  • Supports extending the type of props accepted by Astro’s Image component.

    5.16.6release notes

  • Supports extending the type of props accepted by Astro’s Picture component.

    5.16.6release notes

  • Button attribute types now allow command.

    5.16.1release notes

  • Button attribute types now allow commandfor.

    5.16.1release notes

  • Adds a utility type that infers an action's TypeScript input type from its Zod schema.

    5.16.0release notes

  • Adds experimental SVGO optimization for SVG assets during builds, reducing file sizes while maintaining visual quality.

    5.16.0release notes

  • Adds an export alias for astro/jsx-runtime, enabling JSX development runtime imports through astro/jsx-dev-runtime.

    5.15.3release notes

  • Adapters can append query parameters to all generated asset URLs during the build process.

    5.15.0release notes

  • Adapters can provide headers for Astro internal fetch calls, including Actions, View Transitions, Server Islands, and Prefetch.

    5.15.0release notes

  • The experimental Fonts API can preload selected font weights, styles, or subsets for a font family.

    5.15.0release notes

  • Adapters can specify a static or server build output, including requesting server output when a project has no server-rendered pages.

    5.0.0release notes

  • A new Integration API hook exposes routes before astro:config:done and runs again whenever a route changes in development.

    5.0.0release notes

  • This integration field now accepts URL as a type.

    5.0.0release notes

  • This renderer field now accepts URL as a type.

    5.0.0release notes

  • The astro:config:done hook now returns the build output type, allowing integrations to determine whether a project will be static or server-rendered.

    5.0.0release notes

  • The astro:config:setup hook provides createCodegenDir() to retrieve and create an integration-specific directory for generated files, avoiding conflicts with Astro or other integrations.

    5.0.0release notes

  • astro build --devOutput produces an optimized build with development debug information.

    5.0.0release notes

  • Enabling this experimental option adds responsive image layouts with generated srcset and sizes attributes for Image and Picture components.

    5.0.0release notes

  • Enabling this experimental option allows SVG files to be imported as components and inlines their content into HTML output by default.

    5.0.0release notes

  • The file loader accepts an optional parser function for custom file formats and nested data; JSON and YAML are detected and parsed automatically.

    5.0.0release notes

  • The built-in glob() content collections loader accepts arrays of patterns, including negative patterns to exclude files.

    5.0.0release notes

  • Configure a custom route for the image endpoint, which can help avoid conflicts with the default /_image route.

    5.0.0release notes

  • Sets the default layout for Image and Picture components when responsive images are enabled; a component's layout prop can override it.

    5.0.0release notes

  • This integration field now accepts URL as a type.

    5.0.0release notes

  • Image and Picture accept a layout prop with responsive, fixed, full-width, or none values when responsive images are enabled.

    5.0.0release notes

  • Set this flag to keep the previous legacy content and data collection behavior while preparing to update to the new Content Layer implementation.

    5.0.0release notes

  • Types for all LoaderContext properties are exported from astro/loaders. The previously internal ScopedDataStore interface is renamed DataStore and made the public data store API.

    5.0.0release notes

  • The astro:server:setup hook adds refreshContent to refresh all content layer collections or only collections using specified loaders, optionally passing context to loaders.

    5.0.0release notes

  • The RenderResult type is now exported.

    5.0.0release notes

  • Astro and APIContext now expose the current route pattern being rendered.

    5.0.0release notes

  • slug is now allowed as a field in content layer data.

    5.0.0release notes

  • Adapter feature values can now be objects with support and message properties; the message is shown in the CLI when a feature is incompatible.

    5.0.0release notes

  • Adapters can use the new limited value to indicate compatibility with a feature that has limitations or does not support every case or option.

    5.0.0release notes

  • A Welcome component is newly exported from astro/components for use by the new Basics template.

    5.0.0release notes

Performance 2

  • Render chunks are grouped when emitted from async iterables to avoid encoding costs, improving rendering performance.

    5.16.7release notes

  • Build performance and memory usage improve for medium-sized blogs with many content entries.

    5.16.5release notes

Behavior and default changes 14

  • The file() loader parser() option can now return a Promise, enabling asynchronous fetching and parsing.

    5.17.0release notes

  • The glob() loader now warns when duplicated IDs are detected.

    5.16.5release notes

  • The experimental Fonts API warns when provided font families use conflicting cssVariable values.

    5.15.6release notes

  • Remote font families can be specified multiple times with different weight and style combinations, downloading only the required files.

    5.15.6release notes

  • getContainerRenderer() now returns a client hydration entrypoint, enabling client-side interactivity without manually calling container.addClientRenderer().

    5.15.4release notes

  • Adapter-level query parameters now apply to all image and font asset URLs, including dynamic and static optimized images and experimental Fonts API requests.

    5.15.3release notes

  • Importing astro/config automatically makes astro/client types available to the project, including after astro sync when tsconfig.json changes reference behavior.

    5.0.0release notes

  • The environment-variable schema feature is no longer experimental; configure it with a top-level env option and import variables from astro:env/client or astro:env/server.

    5.0.0release notes

  • This integration field now accepts URL as a type.

    5.0.0release notes

  • The flag accepts custom modes beyond production and development to set import.meta.env.MODE and select the corresponding .env file.

    5.0.0release notes

  • Server Island requests use GET with search parameters and can be preloaded; they fall back to POST when the URL would exceed the browser's limit.

    5.0.0release notes

  • The default content config location changes from src/content/config.* to src/content.config.*. The previous location remains supported and is required when legacy.collections is enabled.

    5.0.0release notes

  • Astro’s tsconfig presets now exclude {projectDir}/dist by default; projects can override this value.

    5.0.0release notes

  • Astro’s tsconfig presets now include {projectDir}/.astro/types.d.ts and {projectDir}/**/* by default; projects can override these values.

    5.0.0release notes

Tooling 7

  • Adding the Vercel adapter now adds .vercel to .gitignore.

    5.16.14release notes

  • Adds keyboard shortcuts to open the site, quit the preview, and display available shortcuts.

    5.16.0release notes

  • The experimental Fonts API build log now shows the number of downloaded files, helping identify excessive downloading from misconfiguration.

    5.15.9release notes

  • The command now scaffolds wrangler.jsonc and public/.assetsignore so Astro projects work out of the box as workers.

    5.15.0release notes

  • The MDX Content component's components prop now has TypeScript support when using await render(), providing IntelliSense and type checking.

    5.15.0release notes

  • The dev-mode error overlay stack trace now has a button for copying the stack trace.

    5.15.0release notes

  • The file is optional for standard Astro projects, and astro sync no longer creates or updates it.

    5.0.0release notes

Fixes and other changes 52

  • SSR manifests now populate styles for prerendered routes, allowing workers or middleware to discover the CSS files used by a prerendered page.

    5.18.2release notes

  • Font providers supplied as class instances now work with the experimental Fonts API, including the local provider.

    5.16.15release notes

  • CSS assets with remote assetsPrefix URLs no longer receive an invalid leading slash in generated stylesheet links.

    5.16.12release notes

  • CSS deduplication is reintroduced for hydrated client components, preventing assets in client chunks from being flagged as orphaned.

    5.16.12release notes

  • Stopping the dev server with q+enter no longer creates a dist folder or copies font files.

    5.16.12release notes

  • React components nested inside HTML elements in MDX files now hydrate correctly.

    5.16.12release notes

  • Styles for conditionally rendered Svelte 5 components are now included in production builds.

    5.16.12release notes

  • Prevents the same CSS file from being bundled twice when imported in page frontmatter and a component script.

    5.16.11release notes

  • Validates route modules and provides a descriptive error when a valid page function is missing.

    5.16.10release notes

  • Fixes CSS url() references to public assets returning 404 in dev mode when a base path is configured.

    5.16.10release notes

  • Fixes an image 500 error when moving the dist directory in standalone Node deployments.

    5.16.10release notes

  • Fixes component scripts failing to render when an unused sibling slot Fragment exists.

    5.16.9release notes

  • Requests with query parameters to the base path no longer return a 404 in development when trailingSlash is not ignore.

    5.16.8release notes

  • Cookie values set with context.cookies.set() are no longer overridden by cookies set through response headers in development.

    5.16.8release notes

  • The Unsupported page types found error now appears only in more realistic cases.

    5.16.8release notes

  • The audit warning is skipped for images inside framework components such as React, Vue, and Svelte.

    5.16.8release notes

  • Certain aliases now work when using images in JSON files with the content layer.

    5.16.7release notes

  • Remote image Etag header handling is fixed by disabling the internal cache.

    5.16.7release notes

  • Images outside the project directory now work with astro:assets in development mode.

    5.16.6release notes

  • SVGs now work in development mode when using the passthrough image service.

    5.16.6release notes

  • JSDoc annotations now appear for font-related APIs in the Astro config.

    5.16.5release notes

  • Actions types now work correctly with specific TypeScript configurations.

    5.16.3release notes

  • In SSR, setting a page status to 404 now uses the current page instead of showing an empty page or 404.astro.

    5.16.2release notes

  • A Vite warning log during builds when using npm is fixed.

    5.16.2release notesrelease notes

  • Restores support for Astro component rendering in Vitest suites using client environments such as happy-dom or jsdom.

    5.16.1release notes

  • Fixes an unhandled rejection issue when using Astro with Vercel Workflow DevKit.

    5.16.1release notes

  • Wildcard hostname matching now rejects single-part hostnames that do not contain valid matching subdomains.

    5.15.9release notes

  • Adds handling for invalid encrypted props and slots in server islands.

    5.15.9release notes

  • The rewrite fallback system now generates fallback files for pages whose filename starts with a locale key.

    5.15.7release notes

  • process.env is now properly populated during the build.

    5.15.7release notes

  • Hydration now works in the dev server when a barrel file re-exports Astro and UI framework components.

    5.15.6release notes

  • Persisted components using declarative Shadow DOM no longer fail navigation because Astro avoids re-attaching an existing shadow root.

    5.15.6release notes

  • Improves fallback generation when using the experimental Fonts API.

    5.15.5release notes

  • Prevents build-time process.env values from being incorrectly inlined into server output.

    5.15.5release notes

  • The experimental Fonts API no longer filters available font files too aggressively, allowing Google-provider woff files to download.

    5.15.4release notes

  • Fixes a regression that caused ?url imports to not work correctly.

    5.15.1release notes

  • Normalizes bare filenames to relative paths for consistent image resolution in markdown frontmatter and JSON content collections.

    5.14.8release notes

  • The actions endpoint returns 404 for non-existent actions instead of throwing an unhandled error.

    5.14.7release notes

  • Actions no longer throw errors while loading.

    5.14.7release notes

  • Astro.site is no longer always undefined inside getStaticPaths().

    5.14.7release notes

  • CSS handling for hydrated client components now prevents duplicate styles.

    5.14.7release notes

  • The muted HTML attribute now behaves consistently with other attributes.

    5.14.6release notes

  • The experimental live collections entry type now includes rendered, preventing TypeScript errors when using it.

    5.14.6release notes

  • Content types are now generated when first running astro dev even if src/content does not exist.

    5.0.0release notes

  • Astro.currentLocale now returns the correct locale when consumed inside a server island instead of always returning the default locale.

    5.0.0release notes

  • The origin check middleware is no longer injected for static build output or run for prerendered pages.

    5.0.0release notes

  • Content config is no longer ignored when it is outside the content directory and has a parent directory whose name begins with an underscore.

    5.0.0release notes

  • The image endpoint route now handles a trailing slash consistently with the trailingSlash configuration.

    5.0.0release notes

  • Values returned from inline loaders are now parsed correctly.

    5.0.0release notes

  • Configured redirects are constructed correctly in the dev server, which now returns an HTML response matching the one emitted by a static build.

    5.0.0release notes

  • Prerendering no longer fails with Invalid property descriptor errors when the Request.headers prototype is modified.

    5.0.0release notes

  • SVG files with multiple root nodes are now handled.

    5.0.0release notes