Packages

astro

7.4.1MIT
  • 7.4.1 is the latest, published 19 October 2026.
  • 27 security advisories, all fixed.
  • 7.x: 39 releases since 22 June 2026, 25 in the last 90 days.

Security advisories

Grouped by the version that fixes them, so one upgrade reads as one step.

18 older fixes

Releases in the last 90 days

Feed of releases and advisories

Every stable release, newest first. Notes are quoted as the maintainers published them.

  1. 7.4.1

    19 October 2026
    Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms

    Patch Changes

    • Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms

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

    • Fixes a bug where projects whose path contains an apostrophe (') failed to load sessions, middleware, a cache provider, or a src/fetch.ts handler

    • Fixes a TSCONFIG_ERROR during astro build when a parent directory contains a tsconfig.json that cannot be resolved, such as one extending astro/tsconfigs/strict without installed dependencies

    • Fixes an Unterminated string build error when application code imports from astro/config (for example, fontProviders in a shared fonts module)

    • Fixes missing styles in production builds for conditionally rendered framework components (e.g. Svelte components inside {#if} blocks) imported by a hydrated island

    • Fixes style-only HMR in .astro components falling back to a full page reload when a PostCSS plugin (such as @unocss/postcss) lists the component as a dependency of its own style

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

  2. 7.4.0

    15 October 2026
    Adds a new --timings flag to astro build to help you find what slows down your buildsWhen a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the --timings flag to your build command to print a summary once the build finishes:astro build --timingsThis is helpful to decide what to optimize first, or to compare build times before and after a change to your project.

    Minor Changes

    • Adds a new --timings flag to astro build to help you find what slows down your builds

      When a build takes longer than expected, it can be hard to tell whether the cause is an integration, a Markdown processor plugin, image processing, or even syntax highlighting. Add the --timings flag to your build command to print a summary once the build finishes:

      astro build --timings

      This is helpful to decide what to optimize first, or to compare build times before and after a change to your project.

    • Adds a new optional getFontProperties() callback to font providers

      Font providers can now expose the weights, styles, subsets and formats a font family actually has. Astro uses it when resolving your font configuration to warn about values a provider cannot serve, for example a weight a font family does not offer.

      All built-in providers implement it. If you maintain a custom font provider, implementing this callback is optional for now but it will be required in Astro 8:

      import type { FontProvider } from 'astro';
      
      const provider: FontProvider = {
          name: 'my-provider',
          resolveFont: ({ familyName }) => {
              // ...
          },
          getFontProperties: ({ familyName }) => ({
              weights: ['400', '700'],
              styles: ['normal', 'italic'],
              subsets: ['latin'],
              formats: ['woff2'],
          }),
      };
    • Adds a fetch() function to the font provider init() context

      This function requests a provider API, retrying transient failures and more. It lets providers that wrap a 3rd-party unifont provider pass the context to it directly:

      import type { FontProvider } from 'astro';
      import type { InitializedProvider } from 'unifont';
      import { acmeProvider } from '@acme/unifont-provider';
      
      export function acmeFontProvider(): FontProvider {
          const provider = acmeProvider();
          let initializedProvider: InitializedProvider | undefined;
          return {
              name: provider._name,
              async init(context) {
                  initializedProvider = await provider(context);
              },
              // ...
          };
      }
    • Adds experimental.redirectPage, letting you provide your own src/pages/3xx.astro in place of the redirect page Astro generates in static builds.

      A static site has no server to send an HTTP Location header, so Astro generates a small HTML page with a <meta http-equiv="refresh"> tag for each redirect it builds:

      • Your redirects entries

      • Astro.redirect() calls in prerendered pages

      • i18n redirects

      That page's markup, wording, and refresh delay were fixed, so you could not brand or translate it.

      To enable this feature, add the experimental flag to your Astro config:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          redirectPage: true,
        },
      });

      Then create src/pages/3xx.astro. Astro renders it once per redirect, passing that redirect's details as props:

      ---
      // src/pages/3xx.astro
      import type { RedirectPageProps as Props } from 'astro';
      
      const { from, to, status, delay } = Astro.props;
      ---
      
      <html lang="en">
        <head>
          <meta http-equiv="refresh" content={`${delay};url=${to}`} />
          <meta name="robots" content="noindex" />
          <title>Redirecting…</title>
        </head>
        <body>
          <p>This page has moved. <a href={to}>Continue to {to}</a>.</p>
        </body>
      </html>

      Your page must render a <meta http-equiv="refresh"> tag pointing at to, because in a static build that tag is the redirect. Astro logs a warning during the build if it is missing.

      See the experimental redirect page documentation for more information.

    • Adds a notFound() handler to astro/fetch and astro/hono that renders the custom 404 page when no route matches, including a prerendered 404.astro

      Add it before pages() in a custom worker or server entrypoint that does not run inside App.render, such as a Hono app used directly as a Cloudflare worker. Without it, pages() and middleware() return an empty 404 with an internal X-Astro-Error header for unmatched routes. astro() already includes this handling.

      import { Hono } from 'hono';
      import { notFound, pages } from 'astro/hono';
      import { cf } from '@astrojs/cloudflare/hono';
      
      const app = new Hono();
      app.use(cf());
      app.use(notFound());
      app.use(pages());
      export default app;
    • Adds support for separate build and runtime image services

      image.service now also accepts a build and a runtime service. The build service optimizes images on prerendered pages when you build your site, and is also used during development. The runtime service handles images on on-demand rendered pages and the image endpoint of your deployed site.

      The following example uses Sharp to optimize images on prerendered pages, and an image CDN for on-demand rendered pages:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        image: {
          service: {
            build: { entrypoint: 'astro/assets/services/sharp' },
            runtime: { entrypoint: 'my-image-cdn-service' },
          },
        },
      });

    Changes for integration authors

    config.image.service keeps the shape the user configured it with. When a project sets build and runtime services, config.image.service.entrypoint and config.image.service.config are undefined.

    If your integration reads image.service, check for the runtime property to get the service you need:

    'astro:config:done': ({ config }) => {
      const { service } = config.image;
      const runtimeService = 'runtime' in service ? service.runtime : service;
    
      if (runtimeService.entrypoint === 'astro/assets/services/sharp') {
        // ...
      }
    },

    Setting image.service with updateConfig() replaces the existing service instead of merging with it when the two use different shapes. For example, setting a single service in a project that uses build and runtime services replaces both.

    • Increases the minimum Node.js version to 22.22.0

      The minimum supported Node.js version is now 22.22.0, the latest Node.js 22 release supported by StackBlitz. This change is in line with Astro's Node.js support policy.

    • Allows integrations to control where Astro writes client, server, and prerender build output.

      Custom prerenderers can access the final output locations through the new outputDirectories context:

      setPrerenderer((defaultPrerenderer, { outputDirectories }) => {
        const { client, server, prerender } = outputDirectories
      
        return createPrerenderer({
          defaultPrerenderer,
          client,
          server,
          prerender,
        })
      })
    • Lets custom prerenderers report the images used on prerendered pages

      Astro now generates images on prerendered pages from the image information that a prerenderer's getStaticPaths() and render() return. If your prerenderer wraps Astro's default one, pass this information through:

      setPrerenderer((defaultPrerenderer) => ({
        name: 'my-prerenderer',
        async setup() {
          await defaultPrerenderer.setup?.();
        },
        async getStaticPaths() {
          const result = await defaultPrerenderer.getStaticPaths();
          const { paths, metadata } = Array.isArray(result) ? { paths: result } : result;
          return { paths: paths.filter(({ pathname }) => !pathname.startsWith('/drafts')), metadata };
        },
        render(request, options) {
          return defaultPrerenderer.render(request, options);
        },
        async teardown() {
          await defaultPrerenderer.teardown?.();
        },
      }));

      Returning a plain array from getStaticPaths() or a plain Response from render() still works, but is deprecated: images used on those pages are not generated.

    • Adds support for experimental parallel prerendering

      This experimental feature makes astro build render your static pages in parallel, using multiple CPU cores at once instead of one. On sites with many pages, this can significantly reduce build times, at the cost of higher memory usage.

      To enable this feature, add the experimental flag in your Astro config:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          parallelPrerender: true,
        },
      });

      By default, Astro uses all available CPU cores but one. Each additional worker increases the memory used by your build. If your build runs out of memory, or does not get faster, set workers to a lower number:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          parallelPrerender: {
            workers: 4,
          },
        },
      });

      Each worker renders as many pages at once as your build.concurrency setting allows.

      This feature has no effect when your adapter provides its own way of prerendering pages. Among official adapters, this only applies to @astrojs/cloudflare. Astro logs a warning during the build when the flag is ignored.

      For more information on enabling and using this feature in your project, see the experimental parallel prerendering docs.

    Patch Changes

    • Fixes deployment integrations being unable to use Vite manifests when preparing build output

    • Fixes the JSDoc for CSP utilities to point to the render context reference in docs.

    • Replaces internal use of find-proc with tinyps.

    • Fixes prerender errors being silently swallowed when using a custom src/fetch.ts with an adapter that prerenders in its own runtime, such as @astrojs/cloudflare. Previously, a page that threw during prerendering was written as an empty HTML file and the build succeeded. The build now fails with the underlying error.

    • Fixes original images being kept despite only width or height being read.

    • Fixes glob() loader swallowing rendering errors during content sync, which allowed astro build to exit successfully (code 0) even when a remark/rehype plugin threw an error

    • Fixes the sync command description in astro help, which only mentioned content collections.

  3. 7.3.8

    8 October 2026
    Fixes Astro.cache being undefined when a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't export

    Patch Changes

    • Fixes Astro.cache being undefined when a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't export

    • Fixes astro add removing existing allowBuilds approvals from pnpm-workspace.yaml with pnpm v11.0–v11.22

    • Refactors internal bundling and code transforms to use Vite's Oxc-based transformWithOxc and Rolldown instead of esbuild. These packages no longer depend on esbuild directly.

    • Fixes the glob() loader not reloading changed files in dev when the pattern starts with an extglob such as !(drafts)/**/*.md

  4. 7.3.7

    7 October 2026
    Fixes a build error when a Markdown content collection entry loaded with glob({ deferRender: true }) has a layout frontmatter property. layout is now ignored for content collection entries, as documented.

    Patch Changes

    • Fixes a build error when a Markdown content collection entry loaded with glob({ deferRender: true }) has a layout frontmatter property. layout is now ignored for content collection entries, as documented.

    • Fixes astro add cloudflare failing to install dependencies with pnpm v11+ by approving the workerd build script, and shows the package manager's error output when astro add fails to install dependencies

    • Fixes an issue where AVIF images were served as image/heif instead of image/avif in the dev server.

    • Fixes the cache() handler from astro/hono and astro/fetch throwing a TypeError when a cache provider is configured. It now registers the cache provider before rendering, so Astro.cache is available to downstream handlers like pages().

    • Fixes security.checkOrigin rejecting cross-origin requests with non-form content types such as application/json. As documented, the check only applies to unsafe requests that have no content-type header or one of application/x-www-form-urlencoded, multipart/form-data, or text/plain.

  5. 7.3.6

    6 October 2026
    Fixes an intermittent dev server crash when using astro:actions inside a server island with adapters that use a pre-bundled SSR environment (e.g. @astrojs/cloudflare)

    Patch Changes

    • Fixes an intermittent dev server crash when using astro:actions inside a server island with adapters that use a pre-bundled SSR environment (e.g. @astrojs/cloudflare)

    • Fixes stale scoped styles during HMR when both markup and <style> are changed in a single save

    • Fixes CSS from other pages leaking into a page's <head> in dev when the page imports a module such as astro:config/server.

    • Fixes a bug where server islands containing framework components rendered empty in the dev server when using a custom src/fetch.ts

    • Fixes the composable i18n() handler from astro/fetch and astro/hono returning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matching astro().

    • Fixes CSS Module HMR in dev when a component is rendered both with and without hydration on the same page. Astro now uses path-based class name hashing in dev mode so that editing CSS declarations no longer changes the generated selectors, allowing Vite's CSS HMR to update styles without a full page reload.

    • Fixes context.props being null in middleware and endpoints when the composable astro/hono or astro/fetch actions() handler runs before middleware(), or when pages() runs without middleware()

    • Fixes astro build failing on Windows with Node.js 25+ with ERR_INVALID_ARG_VALUE when clearing the output directory hits a transient EPERM error

    • Fixes type errors reported in Astro's built-in <Picture /> and <Font /> components when type-checking a project with tsc and @astrojs/ts-content-mapper

    • Fixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode

    • Fixes CSS imported from an injectScript('page') script being dropped during build

    • Fixes a hang when a server:defer component is inside a slot of another component in an MDX content collection entry

    • Fixes the glob() loader skipping content files whose paths contain # or ?

    • Fixes a bug where page routes added with injectRoute() returned a 404 when i18n.routing.prefixDefaultLocale was true and the route path had no locale prefix

    • Fixes content collection changes being ignored in astro dev after the dev server restarts because of a config change

    • Fixes Astro.cookies.get() returning undefined for request cookies with empty values

    • Fixes nondeterministic ordering of the server manifest's assets array, ensuring builds with identical inputs produce byte-identical output

    • Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc.

    • Improves CSRF protection by taking modern browsers headers into account

    • Fixes a runtime ReferenceError for inlined scripts that import a URL with /* @vite-ignore */.

      Astro now inlines scripts after Vite replaces its preload markers, so ignored dynamic imports can remain inline without shipping an unresolved __VITE_PRELOAD__ reference.

    • Fixes custom View Transition direction names that are not valid CSS identifiers, such as names starting with a digit or containing spaces. These directions now match their animations correctly.

    • Fixes a 404 for a CSS file that a dynamic import preloads when the imported module uses a component that is also a hydrated island on the same page

    • Fixes duplicate CSS in production builds when a component is both server-rendered and used with client:only on the same page

    • Fixes the composable astro/fetch and astro/hono handlers (trailingSlash(), redirects(), actions(), middleware(), and pages()) so they reject over-encoded request paths with a 400 Bad Request, matching astro(). For these requests, redirects() and actions() return the 400 response instead of undefined, so no redirect is issued and no action runs.

    • Fixes Astro.rewrite() and context.rewrite() selecting the wrong route in astro dev when two dynamic routes match the same path

    • Allows Astro CLI commands to install tagged package versions

    • Fixes a dev server dependency scan failure when an .astro file contains a literal <script in frontmatter or a template expression

    • Fixes Astro on StackBlitz and other WebContainer environments

    • Fixes a MODULE_LEVEL_DIRECTIVE warning during build caused by a stale "use astro:head-inject" directive in content collection propagated asset modules

  6. 7.3.5

    24 September 2026
    Adds a new container function called renderComponent(), which renders Astro components with inlined styles and scripts.Users must import the component with the new ?container query string:import { experimental_AstroContainer } from "astro/container";

    Patch Changes

    • Adds a new container function called renderComponent(), which renders Astro components with inlined styles and scripts.

      Users must import the component with the new ?container query string:

      import { experimental_AstroContainer } from "astro/container";
      import TodoList from "../components/TodoList.astro?container";
      
      const container = await experimental_AstroContainer.create();
      
      const _string = container.renderComponent(TodoList);
  7. 7.3.4

    22 September 2026
    Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.

    Patch Changes

    • Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets.

    • Improves the astro check error shown for TypeScript 7. The command now explains that TypeScript 7 is not currently supported and provides instructions for experimentally type-checking Astro files with TypeScript 7.1 and @astrojs/ts-content-mapper.

    • Fix double-escaped ampersands in Markdown image alt and title attributes. The __ASTRO_IMAGE_ round-trip now decodes the numeric (&#x26;) and named (&amp;) character references the Markdown processors emit, so an & in an alt or title is escaped exactly once in the final HTML instead of twice.

    • Fix three error names that did not match their documented reference. MissingLocale, MissingIndexForInternationalization and NoManifestAvailable reported names ending in Error in the dev overlay, while their error reference pages are published under the unsuffixed names, so the name shown to users could not be found in the docs.

    • Fixes the dev server re-evaluating the whole server module graph on every request. The astro:head-metadata plugin invalidated its component metadata virtual module from its own transform hook, so each evaluation of that module scheduled the next one. Adapters that run requests outside Vite's module runner, such as @astrojs/cloudflare, paid for a full re-evaluation of the server graph on every request for the lifetime of the process.

    • Fixes domain-based i18n routing to respect security.allowedDomains when selecting a locale from request host headers

    • Fixes image.responsiveStyles emitting invalid object-position CSS values for same-axis keyword pairs (top bottom, left right, etc.)

    • Runs astro dev and astro preview in the foreground when an AI agent is detected on Windows, allowing the agent to manage the process lifetime. Pass --background explicitly to request an Astro-managed background process. Agent-inferred backgrounding remains enabled on other platforms.

  8. 7.3.3

    16 September 2026
    Refactors internal version handling to use a smaller, ESM-native dependency

    Patch Changes

    • Refactors internal version handling to use a smaller, ESM-native dependency

    • Returns appropriate 400 and 404 responses from the image endpoint for invalid and missing local image paths

    • Fixes Astro.preferredLocaleList returning an empty list when a locale is configured with the object form ({ path, codes }) and the browser sends the code with different casing or an underscore, such as en-US matching a configured en-us

    • Fixes astro preview --ignore-lock (and astro dev --ignore-lock) being refused when run from an AI agent environment. The flag now starts the server in the foreground instead of erroring, since agent detection only inferred background mode and was never explicitly requested. An explicit --background combined with --ignore-lock still errors.

    • Fixes TypeScript autocompletion for getImage() to suggest all available predefined options.

    • Fixes a type error in getImage() options that allowed passing both widths and densities at the same time.

    • Improves rendering performance

    • Fixes a WebAssembly error when importing astro:actions in tests that run under @cloudflare/vitest-pool-workers

    • Fixes trailing-slash redirect response body pointing to the incoming URL instead of the redirect target. The location header was correct, but the HTML body (<meta http-equiv="refresh">, <title>, and <a> tag) contained the original request path without the trailing-slash correction or query string.

    • Fixes custom dev toolbar apps losing their UI after client-side navigation with <ClientRouter />.

    • Fixes prerendered Cloudflare pages rendering as [object Object] when nodejs_compat is enabled in wrangler.toml

    • Fixes a regression in astro dev where writes outside the module graph (for example, @astrojs/cloudflare's .wrangler/state files) invalidated the middleware on every request, causing repeated SSR reloads. Such writes no longer invalidate the middleware.

    • security

      Updates svgo to 4.0.2 to resolve a security advisory

    • Fixes a one-time page reload shortly after the first load on cold dev-server starts when a project has framework components imported from MDX content entries. MDX files are now included in the dev dependency pre-bundling scan, so their framework dependencies are bundled up front instead of being discovered (and reloaded for) at runtime.

    • Improves dev server startup time. The content config and dev server app module graphs now begin compiling during server creation without blocking the server from listening. Request handling waits for the shared setup result when needed, cutting astro dev ready time by roughly a third on projects with a content config.

    • Improves the diagnostics of some Astro errors.

    • Fixes SVG <style> elements nested inside <defs> or other container elements not being hashed for CSP

    • Fixes experimental.incrementalBuild restoring pages with stale CSS after a preprocessor partial changes or missing original images referenced by restored pages

    • Fixes a bug where the dev server stripped the configured base from URLs that only share a prefix with it. With base: '/s', requests to /src/... were rewritten to /rc/... and failed, breaking those pages during development.

    • cfccafa Thanks @gameroman! - Improves JSDoc for fonts api

    • Fixes CSS HMR for framework components rendered through content entries after ClientRouter navigation

    • Improves serialization of transition animation values in generated CSS

    • Fixes content collection HMR not updating prerendered pages when an adapter enables a separate prerender environment (e.g. @astrojs/cloudflare with prerenderEnvironment: 'node')

    • Fixes redirect targets being corrupted when a dynamic route parameter value contains $ replacement patterns like $&

    • Fixes a bug where the glob() content loader kept stale entries in the data store after the last file in a collection was deleted. Empty collections are now pruned correctly, and the file watcher is registered in dev so the first file added to an empty collection is picked up without a restart.

    • Pre-bundles renderer server entrypoints and the default console logger during dev so they are included in the initial optimization pass, preventing a mid-request re-optimization that could crash the dev server on Cloudflare (workerd).

  9. 7.3.2

    8 September 2026
    Fixes / rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a / child (e.g. {value}) is now escaped like any other element's content instead of being rendered raw. Use set:html to explicitly opt a dynamic value back into raw rendering.

    Patch Changes

    • Fixes <script>/<style> rendering in MDX so that only literal content (including content injected by remark/rehype plugins) is treated as trusted markup. A dynamic value passed as a <script>/<style> child (e.g. <script>{value}</script>) is now escaped like any other element's content instead of being rendered raw. Use set:html to explicitly opt a dynamic value back into raw rendering.

    • Fixes the dev toolbar returning a 504 "Outdated Optimize Dep" error when a workspace-linked package imports a dependency that Vite's initial scan did not discover

    • Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like /energy/en/about into /esergy/en/about

    • Fixes sessions breaking in dev mode with the Cloudflare adapter when middleware is present

  10. 7.3.1

    3 September 2026
    Fixes an error that prevented projects using astro:assets from starting or building

    Patch Changes

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

Show 15 earlier releases
  1. 7.3.0

    3 September 2026
    Adds --ignore-lock flag to astro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.

    Minor Changes

    • Adds --ignore-lock flag to astro preview, allowing multiple preview servers to run simultaneously on different ports. This is useful for E2E testing workflows (e.g., Playwright) that need to run several preview servers at once.

    • Adds a logger parameter to image services hooks

      Custom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in logger and respect your log level, instead of being written straight to the console:

      import type { LocalImageService } from 'astro';
      
      const service: LocalImageService = {
        // ...
        async transform(inputBuffer, transform, imageConfig, logger) {
          logger.warn(`Could not optimize "${transform.src}". Passing it through unchanged.`);
          return { data: inputBuffer, format: 'png' };
        },
      };

      Astro's built-in Sharp service now uses this logger for the warnings it emits when it encounters an unexpected or unsupported source format.

    • Adds logger to the context object passed to cache providers

      Custom cache providers now receive Astro's runtime logger on the context passed to onRequest(). Messages logged with it are routed through the destination configured in logger and respect your log level, instead of being written straight to the console:

      import type { CacheProvider } from 'astro';
      
      const provider: CacheProvider = {
        name: 'my-cache',
        async onRequest({ request, url, logger }, next) {
          logger.warn(`Skipping cache for ${url.pathname} because the response sets a cookie.`);
          return next();
        },
        // ...
      };

      Astro's built-in memoryCache() provider now uses this logger for the warnings it emits when it skips caching a response that sets cookies, and when a background revalidation fails.

    Patch Changes

    • Updates Astro's remaining internal warnings and errors to be written through the configured logger instead of directly to the console, when possible

    • Fixes the memory cache provider to skip responses with Vary: Cookie or Vary: *

    • Improves build performance for sites with a large number of pages coming from a large amount of different modules.

    • Adds concurrent rendering support for experimental.incrementalBuild, including when using @astrojs/cloudflare

      Incremental builds no longer disable caching when build.concurrency is greater than 1. Projects that set build.concurrency: 1 to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages.

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

    • Fixes i18n fallback routes being generated with a corrupted path when the locale code also appears at the start of a later path segment. A page such as src/pages/en/enterprise.astro with fallback: { es: 'en' } produced the route /es/esterprise instead of /es/enterprise, so the fallback never matched the intended URL. Only the leading locale segment is rewritten now.

  2. 7.2.10

    31 August 2026
    Fixes @astrojs/markdown-remark being pinned to an exact version.

    Patch Changes

    • Fixes @astrojs/markdown-remark being pinned to an exact version.

    • Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtime Invalid URL crash at server boot

    • Fixes a case where the logger was improperly initialized at runtime in dev.

    • Fixes browser heuristic caching for cached responses that include Last-Modified or ETag validators

    • Fixes prerender conflict warnings to correctly identify the route that first rendered a duplicate pathname, instead of misattributing the conflict to an unrelated route that merely matches the URL pattern

    • Fixes Markdown images in content collections rendering an empty srcset attribute when no responsive candidates are generated.

    • Fixes a bug where editing a content collection entry during astro dev on Windows kept serving stale content until the dev server was restarted. The data store now notifies the dev server directly after each write instead of relying only on the file watcher, which can miss the atomic rename that commits the write on some platforms.

  3. 7.2.9

    27 August 2026
    Fixes importing .html files not being typed outside of .astro files

    Patch Changes

    • Fixes importing .html files not being typed outside of .astro files

    • Fixes a crash when requesting /index.html against a dynamic page route like [slug].astro

    • Fixes SSR manifest containing stale entryModules references to prerender-only chunks that no longer exist in the final build output

    • Fixes set:text escaping in MDX script and style elements

  4. 7.2.8

    26 August 2026
    Updates the minimum supported version of Sharp to 0.35.4

    Patch Changes

    • Updates the minimum supported version of Sharp to 0.35.4

    • Replaces the internal find-process dependency with a smaller, lighter alternative

  5. 7.2.7

    25 August 2026
    Deserializes each route once when loading the SSR manifest

    Patch Changes

    • Deserializes each route once when loading the SSR manifest

    • Fixes route selection for normalized request paths in adapter and development request handling

    • Updates generated and default Cloudflare compatibility_date values to match the installed runtime and requires Wrangler ^4.125.0

    • Fixes rewrite() and next(payload) for GET and HEAD requests with host-provided bodies

    • Fixes the experimental svgOptimizer not generating unique per-file ID prefixes when using SVGO's prefixIds plugin

  6. 7.2.6

    24 August 2026
    Fixes a bug where new FetchState(request) could fail in development when server dependencies were optimized

    Patch Changes

    • Fixes a bug where new FetchState(request) could fail in development when server dependencies were optimized

  7. 7.2.5

    24 August 2026
    Fixes a bug where experimental_getFontFileURL() rejected valid font URLs when using the Cloudflare adapter

    Patch Changes

    • Fixes a bug where experimental_getFontFileURL() rejected valid font URLs when using the Cloudflare adapter

    • Skips no-op pathname writes when normalizing SSR request URLs

    • Updates deprecation messages target from Astro 7 to 8

    • Fixes session ID validation to reject non-UUID cookie values before using them as storage keys

    • Fixes --mode, --site, --base, --out-dir, --verbose, --silent, and --open flags being silently dropped when using astro dev --background or astro preview --background

    • Fixes content-modules.mjs not removing entries for deleted or renamed content files, which could cause Vite to attempt to resolve non-existent modules

      As part of this fix, #moduleImports is now fully rebuilt from deferredRender entries before every write, so a module import added only through the public addModuleImport() API without a corresponding deferredRender entry in the store will no longer be preserved across writes.

    • Fixes Astro.preferredLocale and Astro.preferredLocaleList ignoring Accept-Language quality values when they are absent or 0. An entry without an explicit q= now correctly counts as quality 1.0 (per RFC 7231) and an entry with q=0 is treated as not acceptable, so the highest-quality locale is selected regardless of header order.

    • Fixes build errors showing wrong file location, missing line:col, and misleading hints when a plugin error (e.g. from MDX) is wrapped by Vite's build error

    • Fixes a type error when passing an image from a content collection image() schema to a component or <Image />. The schema returned by image() was missing the apng format, so it no longer matched the type of an imported image.

    • Fixes an issue where Astro CSP support didn't correctly handle cases "unsafe-inline" resource. Now when "unsafe-inline", Astro won't emit hashes for the directive specified.

    • Fixes a regression in the content collections that could cause images to not be resolved

    • Fixes memoryCache() storing responses that set cookies through Astro.cookies or Astro.session

    • Fixes server:defer crashing the dev server with "undefined is not a function" when a deferred component imports from astro:i18n

    • Fixes a regression where transition:persist stopped working for <audio> and <video> elements.

    • Adds support for importing .apng files as image metadata for use with standard <img> elements. Astro's image components reject APNG files to avoid removing their animation

    • Fixes i18n fallbackType: "rewrite" returning 500 instead of 404 when the fallback locale also has no matching static path for a prerendered dynamic route

    • Bumps the Astro compiler to the latest version. Changelog.

    • Improves the performance of the Astro CLI in local by enabling Node's module compilation cache.

    • Fixes incremental builds serving cached HTML that references stale CSS filenames after a stylesheet-only edit

    • Fixes the dev server refusing to start in Docker containers after a restart due to PID reuse in the lock file check

    • Fixes a build failure when defining vite.environments.ssr in the Astro config. User-provided environment config for ssr, prerender, or client is now properly deep-merged with Astro's internal environment settings instead of silently breaking the server entry naming.

    • Fixes the glob() content loader failing to load files with colons in their names (e.g., Guide: Architecture.md)

  8. 7.2.4

    19 August 2026
    Fixes builds hanging when an image file is malformed

    Patch Changes

    • Fixes builds hanging when an image file is malformed

    • Fixes base path stripping to respect path-segment boundaries. With a configured base such as /docs, a request like /docs-archive/page is no longer treated as being under the base, so routing and context.url.pathname now agree on the same pathname.

    • Fixes astro build throwing TypeError: Missing parameter for dynamic routes when build.format: 'preserve' and trailingSlash: 'always' are used together. Stripping the framework-injected .html suffix dropped the trailing slash that the compiled route pattern requires, so the route no longer matched itself and its params resolved as empty.

    • Fixes Astro.site always being undefined when rendering components via the Container API, even when site is set in astroConfig

  9. 7.2.3

    18 August 2026
    Fixes an issue where Astro could run out of memory when experimental.collectionStorage is set to chunked and there are multiple concurrent updates to the same collection.

    Patch Changes

    • Fixes an issue where Astro could run out of memory when experimental.collectionStorage is set to chunked and there are multiple concurrent updates to the same collection.

    • Fixes the dev server sometimes matching against stale routes after pages were added, removed, or renamed, requiring a dev server restart to pick up the change

    • Fixes the composable request helpers (astro/fetch) throwing an error when used on a request that had been rewritten with Astro.rewrite() or next()

    • Refactors Astro's internal server-side request handling. This is an internal change: all documented public APIs, including App and NodeApp, keep their existing signatures and behavior.

      The undocumented internal app.pipeline property and the AppPipeline export from astro/app have been removed. Adapters that used app.pipeline.getLogger() to wait for the configured log destination can call the new app.getLogger() instead.

      As a result of this refactor, new FetchState(request) from astro/fetch now works anywhere inside a built Astro server — including custom src/fetch.ts entrypoints — without the request needing to first pass through app.render(). Previously this threw an error, breaking patterns like the Cloudflare adapter's advanced custom-worker setup.

    • Fixes a link in font providers JSDoc annotations

    • Fixes several documentation issues related to the JSDoc for configuration options.

      • When hovering over the server and fonts options, the JSDoc for the nested options was displayed instead of the JSDoc for the top-level property.

      • Two i18n configuration options were being used incorrectly in the examples.

      • The indentation of some code blocks was broken on hover.

    • Fixes a crash when a request arrives with a malformed port in the Host header (for example example.com:65536 or example.com:8080:8080). Such a host made the constructed request URL invalid, and the fallback that was meant to recover reused the same invalid host and threw again. The request URL now degrades to a host the server controls when the incoming host cannot be parsed, so the request is handled instead of erroring.

    • Fixes a dev server error where an SSR full reload triggered by a third-party Vite plugin (such as @tailwindcss/vite) could fail with Failed to load url astro:server-app.js

    • Improves error handling for custom log destinations. When the configured logger fails to load, Astro now reports the error and continues with the default console logger instead of failing the first request.

    • Fixes getCollection() and getEntry() throwing DataCloneError when a collection schema transform returns a Temporal.PlainDate or other class instance.

  10. 7.2.2

    13 August 2026
    Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment

    Patch Changes

    • Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment

    • Fixes incremental builds dropping optimized images for cached pages when using a collectStaticImages prerenderer (e.g. @astrojs/cloudflare with compile-time image optimization)

    • Fixes intermittent ImageNotFound errors during build on projects with many images. The build now limits concurrent image file reads to avoid exhausting OS file descriptors (EMFILE) and retries transient I/O errors with backoff. Non-transient errors are no longer silently swallowed.

    • Fixes prerenderConflictBehavior not applying to content collection duplicate ID warnings in the glob() and file() loaders. Setting it to 'error' now throws during content sync, and 'ignore' suppresses the warning.

    • Fixes the Fonts API breaking experimental.incrementalBuild caching by embedding a build-local, randomly-assigned server port in generated code used for the dependency hash

    • Fixes incremental builds becoming prohibitively slow for sites with many pages or content entries that share a large dependency graph.

    • Prevents files in directories whose names start with pages from being treated as page routes

    • Fixes astro dev refusing to start after a Docker container restart when an unrelated process reuses the PID from a persisted lock file. Astro now checks the process command across platforms, so stale lock files are cleaned up and --force does not signal the unrelated process.

  11. 7.2.1

    11 August 2026
    Fixes CSS hot module replacement after navigating between pages with ClientRouter

    Patch Changes

    • Fixes CSS hot module replacement after navigating between pages with ClientRouter

    • Fixes a CSP violation when using both security.csp and experimental.clientPrerender with data-astro-prefetch links. The dynamically injected <script type="speculationrules"> now uses a static "source": "document" approach with a CSS selector, producing a deterministic payload that is hashed and included in the CSP script-src directive at build time.

    • Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload.

    • Fixes a regression where content collection reference() fields silently accepted entry IDs that don't exist, such as an ID that doesn't match a loader's slugified version of it. Astro now logs an error for references that point to a missing entry after all loaders finish syncing.

    • Improves Markdown options documentation with links to the Markdown guide and official processors.

    • Fixes an issue where requests handled by the dev prerender environment (e.g. /_image with @astrojs/cloudflare's prerenderEnvironment: 'node') returned a 500 when a prerendered catch-all route existed, because non-prerendered route modules were imported in an environment where their runtime-specific APIs are unavailable

    • Fixes <video> and <audio> elements being non-functional after navigating via view transitions (<ClientRouter />)

    • Fixes experimental.incrementalBuild re-rendering unchanged routes that import more than one asset. The route's dependency hash depended on the order the assets finished building, so two builds of identical sources could produce different hashes. The hash is now based on the file name each asset resolves to.

    • Improves getCollection() and getEntry() performance for entries without local image references

    • Fixes a build error caused by hash collisions in generated content collection image import identifiers

  12. 7.2.0

    6 August 2026
    Adds the astro preview --background flag to start preview servers as background processes.This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.astro preview --backgroundWhen a preview server is running in the background, you can inspect or stop it with new astro preview subcommands:astro preview status

    Minor Changes

    • Adds the astro preview --background flag to start preview servers as background processes.

      This makes preview servers easier to manage from scripts and AI coding agents because the command returns after the server is ready instead of keeping the terminal attached to the long-running process.

      astro preview --background

      When a preview server is running in the background, you can inspect or stop it with new astro preview subcommands:

      astro preview status
      astro preview logs
      astro preview logs --follow
      astro preview stop

      If Astro detects that astro preview is being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior for astro dev, allowing agents to continue working after the preview server starts while still receiving the server URL and process ID.

      To opt out of automatic background mode for preview servers, set ASTRO_PREVIEW_BACKGROUND=0 before running astro preview.

    • Adds support for paths relative to your project root in logger.entrypoint

      Previously, pointing logger.entrypoint at a custom log handler living in your own project required building an absolute URL. You can now write the path directly:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        logger: {
      -    entrypoint: new URL('./src/logger.js', import.meta.url),
      +    entrypoint: './src/logger.js',
        },
      });

      Paths starting with ./ or ../ are resolved against your project root. Package specifiers such as @org/astro-logger, absolute paths, and URL entrypoints keep working as before.

    • Widens the AstroPrerenderer render() return type so prerenderers can report incremental-build metadata

      A prerenderer's render() may now resolve to either a Response (as before) or a PrerenderResult object that pairs the response with the content entries and optimized-image transforms the page resolved. This lets prerenderers that render out of process (for example, in an adapter's runtime like workerd) report those dependencies back to the build, so incremental static builds can track and replay them for skipped pages.

      import type { AstroPrerenderer, PrerenderResult } from 'astro';
      
      const prerenderer: AstroPrerenderer = {
        name: 'my-adapter:prerenderer',
        getStaticPaths,
        async render(request, { routeData }): Promise<PrerenderResult> {
          const { response, metadata } = await renderInRuntime(request, routeData);
          return { response, metadata };
        },
      };

      This is a non-breaking widening: prerenderers that return a bare Response continue to work unchanged, and in-process prerenderers can keep returning a Response since the build collects their metadata directly.

    • Adds session: false in astro.config to opt out of session support. Projects that do not set session: false see no behavior change.

      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        session: false,
      });

      The session runtime and dependencies (unstorage) are now tree-shaken out of the SSR bundle for any project where no session driver is wired via:

      • session: false

      • no session config at all

      • a session config without a driver

      Useful for serverless/edge runtimes where cold-start parse time is sensitive.

    • Adds experimental support for incremental static builds with experimental.incrementalBuild.

      When enabled, Astro can skip regenerating static pages from dynamic routes when both the page's module dependencies and its data cache key are unchanged from the previous build. This currently applies to pages returned from getStaticPaths() that include a cacheKey.

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          incrementalBuild: true,
        },
      });

      Return a cacheKey for each generated page from getStaticPaths():

      ---
      export async function getStaticPaths() {
        const posts = await fetchPosts();
      
        return posts.map((post) => ({
          params: { slug: post.slug },
          props: { post },
          cacheKey: post.digest,
        }));
      }
      ---

      For incremental builds to skip rendering in CI, Astro's cache directory must be preserved between builds. Astro empties the output directory on each build and restores skipped pages from the cache directory, so only that directory needs to persist. For the default config, cache and restore node_modules/.astro/ before running astro build.

      See the experimental incremental static builds documentation for more information.

    • Adds the optional digest property to content collection entries.

      Loaders can provide an opaque digest value that changes when an entry changes. This is now reflected in the CollectionEntry type returned by getCollection() and getEntry(), making it easier to detect content changes without re-hashing large entry bodies.

      ---
      import { getCollection } from 'astro:content';
      
      const posts = await getCollection('blog');
      
      for (const post of posts) {
        console.log(post.digest);
      }
      ---

      The property is optional because not every loader provides a digest. See incremental static builds for how digest can be used as a cacheKey.

    Patch Changes

    • Improves logger.entrypoint reference docs

    • Fixes astro dev crashing with Invalid URL when --host is set to a specific non-loopback address

      Vite only reports a local URL for loopback hosts. When the dev server was started with --host <custom-address> bound to a specific non-loopback address (a LAN or Tailscale IP, for example), the URL was reported under network and local was empty, so writing the dev lock file threw Invalid URL and killed a server that had already started successfully.

      The lock file URL now falls back to the network URL, and a server that exposes no URL at all is left untracked rather than being taken down by lock file bookkeeping.

    • Fixes fontProviders.googleicons() returning the full icon font (~3.9MB) instead of only the requested glyphs when multiple experimental.glyphs are specified

    • Fixes Astro.url.pathname for non-index pages when using build.format: 'preserve'. Previously, a page like src/pages/about-me.astro would output to dist/about-me.html but Astro.url.pathname would incorrectly return /about-me/ instead of /about-me.html.

    • Fixes a Content Layer build crash that could occur when another dependency causes an older version of neotraverse to be hoisted to the project root

    • Fixes cookies set via Astro.cookies.set() inside a custom 404.astro or 500.astro error page being silently dropped from the final response

    • Supports the devEngines field in package.json when detecting the package manager for install commands

    • Fixes popover being rendered as popover="true"/popover="false" on custom elements (tag names containing a hyphen). Per the Popover API, the attribute only accepts "auto", "manual", or being absent, so boolean values are now always rendered as a bare popover attribute (or omitted), regardless of the tag name.

  13. 7.1.6

    29 July 2026
    Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes

    Patch Changes

    • Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes

    • Fixes stale dev CSS after editing component style blocks and CSS files in dev

    • Adds a feature to experimental.collectionStorage that allows to change the size of chunks.

      For example, you can reduce the size of chunks to 1MB:

      // astro.config.mjs
      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        experimental: {
          collectionStorage: {
            type: 'chunked',
            chunkSize: 1024 * 1024,
          },
        },
      });
    • Bumps the Astro compiler to the latest version. Changelog.

  14. 7.1.5

    28 July 2026
    Fixes a bug where an error while finalizing a request could prevent a response from being sent

    Patch Changes

    • Fixes a bug where an error while finalizing a request could prevent a response from being sent

    • Fixes a case where a custom logger.entrypoint failed to load at runtime in a built server bundle.

    • Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments

    • Fixes a bug where the custom 404 (or 500) page was not rendered when a middleware rewrite targeted a route that returned an empty 404/500 response, and a blank page was returned instead

    • Updates dependency js-yaml to v4.3.0

  15. 7.1.4

    27 July 2026
    Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.css and _..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.

    Patch Changes

    • Fixes duplicate CSS files being emitted in server output when a prerendered page and a server-rendered page share the same styles (e.g. a shared layout importing Tailwind). The prerender and SSR environments each emitted their own copy of the same stylesheet (index.X.css and _..Y.css); the SSR build now reuses the CSS asset filename from the prerender build when the stylesheet is backed by the same CSS source modules, so only a single file is emitted.

    • Adds the missing background prop to the <Image /> and <Picture /> component types. The prop already worked at runtime, but was absent from the types, causing astro check to report that background does not exist on the component props

    • Fixes missing scoped styles for child components inside client:only islands in production builds

    • Fixes session runtime errors being silently swallowed by console.error instead of routing through Astro's logger

    • Fixes a session being left in a partial state after a storage failure during session.regenerate(), preventing unnecessary storage reads on subsequent operations

    • Prevents a visible terminal window from popping up on Windows when the dev server runs in background mode. The detached child process is now spawned with windowsHide: true, so console-subsystem grandchildren (such as workerd.exe) no longer get a new focus-stealing window allocated by Windows Terminal.

    • Fixes the glob() loader watcher so negation patterns like !docs/drafts/** correctly exclude files during development, matching the behavior of the initial scan. Previously, negations were treated as independent matchers, causing unrelated files (including .astro/data-store.json) to be ingested as collection entries

    • Fixes TypeScript path aliases from tsconfig.json not resolving in astro.config.ts

All 730 releases

Major versions

  • 7.xsince 22 June 2026 · latest 7.4.1 · 39 releases
  • 6.xsince 10 March 2026 · latest 6.4.8 · 41 releases
  • 5.xsince 3 December 2024 · latest 5.18.2 · 137 releases
  • 4.xsince 5 December 2023 · latest 4.16.19 · 145 releases
  • 3.xsince 30 August 2023 · latest 3.6.5 · 48 releases
  • 2.xsince 24 January 2023 · latest 2.10.15 · 93 releases
  • 1.xsince 9 August 2022 · latest 1.9.2 · 65 releases
  • 0.xsince 12 March 2021 · latest 0.26.1 · 162 releases

Quality and security signals

What npm and deps.dev say about the latest release. Signals, not a verdict.

Reading npm and deps.dev…

Registry facts last checked 20 October 2026. Releases and advisories last read 20 October 2026.

Know when your own dependencies move

Inlinr tracks your coding time automatically. Switch dependency tracking on for a project and it reads that repository's manifest to show what is behind and what has been deprecated — off by default, one project at a time.