unstale

npm / astro

astro

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

124 breaking53 security20 deprecations115 new APIs and options22 performance35 behavior and defaults15 tooling435 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.0 on npm

astro 7328 changes

Breaking changes 40

  • 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

  • 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 notes

  • 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

  • The Astro DB CLI command is no longer available.

    7.0.0release notes

  • The Astro init CLI command is no longer available.

    7.0.0release notes

  • The Astro link CLI command is no longer available.

    7.0.0release notes

  • The Astro login CLI command is no longer available.

    7.0.0release notes

  • The Astro logout CLI command is no longer available.

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

  • Astro now supports Vite 8.

    7.0.0release notes

Security 14

  • 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

  • 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 notes

Deprecations 3

  • 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

New APIs and options 43

  • 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 notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

  • A new subcommand stops a running background development server.

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

Performance 12

  • 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 16

  • 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 notes

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

    7.0.0release notes

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

    7.0.0release notes

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

    7.0.0release notes

Tooling 4

  • 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

Fixes and other changes 196

  • 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 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 notes

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

    7.0.0release notes

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

    6.1.7, 7.0.0release notesrelease notes

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

    7.0.0release notes

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

    6.1.9, 7.0.0release notesrelease notes

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

    7.0.0release notes

astro 6384 changes

Breaking changes 70

  • 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

  • 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 notes

  • Removes exposed astro:actions internals.

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

  • 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

  • Removes the previously deprecated Astro.glob().

    6.0.0release notes

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

    6.0.0release notes

  • Replaces the self adapter entryType value.

    6.0.0release notes

  • Removes support for CommonJS configuration files.

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

  • Removes the deprecated emitESMImage() function.

    6.0.0release notes

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

    6.0.0release notes

  • Renames the adapter entryType property to entrypointResolution.

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

  • 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 live collections flag must be removed because live content collections are now supported directly.

    6.0.0release notes

  • Replaces the legacy-dynamic adapter entryType value.

    6.0.0release notes

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

    6.0.0release notes

  • Removes the handleForms prop from the ClientRouter component.

    6.0.0release notes

  • 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 notes

  • import.meta.env values are always inlined.

    6.0.0release notes

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

    6.0.0release notes

  • Removes legacy content collection support.

    6.0.0release notes

  • Changes how IDs are generated for Markdown headings.

    6.0.0release notes

  • 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 notes

  • 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

  • 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

  • Removes rewrite() from the Actions context.

    6.0.0release notes

  • Removes RouteData.generate from the Integration API.

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

  • 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

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

    6.0.0release notes

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

    6.0.0release notes

  • Removes setManifestData from App and NodeApp.

    6.0.0release notes

  • Updates the shiki dependency to v4.

    6.0.0release notes

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

    6.0.0release notes

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

    6.0.0release notes

  • Removes the session test driver.

    6.0.0release notes

  • Removes the deprecated ViewTransitions component.

    6.0.0release notes

  • 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 notes

  • 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 notes

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 16

  • 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

  • Deprecates astro:schema.

    6.0.0release notes

  • Deprecates exposed astro:transitions internals.

    6.0.0release notes

  • Deprecates Astro in getStaticPaths().

    6.0.0release notes

  • 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 notes

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

    6.0.0release notes

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

    6.0.0release notes

  • Deprecates NodeApp from astro/app/node.

    6.0.0release notes

  • 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

  • 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

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

    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

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

    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

  • 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

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 13

  • 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

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 196

  • 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

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

    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 5107 changes

Breaking changes 14

  • 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

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 1

  • Astro.glob is now correctly marked as deprecated.

    5.16.1release notes

New APIs and options 21

  • 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

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 6

  • 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

Tooling 6

  • 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

Fixes and other changes 43

  • 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