-
#18409
2917650Thanks @matthewp! - Fixes a typo in the error message shown when a fontcssVariableis invalid -
#18709
6f1a2a8Thanks @ematipico! - Reduces memory usage duringastro buildby releasing content collection entries from memory once the content layer sync is complete. -
#18713
59052e7Thanks @delucis! - Unpins@astrojs/*dependencies to allow versions matching the^range to be installed -
Updated dependencies [
59052e7]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18641
08e2ceeThanks @astro-factory! - Validates the protocol, host and port fromX-Forwarded-Proto,X-Forwarded-HostandX-Forwarded-Porttogether against eachsecurity.allowedDomainsentry, instead of one at a time:- A forwarded protocol is only applied when an entry allows it for the host in use.
- A forwarded port is only applied when the entry for that host lists it.
- A forwarded host without a forwarded protocol is validated with the protocol of the server.
- An entry with
port: '443'(or'80'forhttp) now matches a host that doesn't include a port.
-
#18651
93a9057Thanks @umeraamir69! - Returns 400 Bad Request for malformed percent-encoded paths in the dev server and static preview instead of bubbling into a 500 -
#18672
e901468Thanks @astro-factory! - Fixesastro checkreporting@astrojs/checkas missing when the package is installed but throws while loading. The original error is now shown instead of an install prompt. -
#18641
08e2ceeThanks @astro-factory! - Fixessecurity.allowedDomainsaccepting non-HTTP(S)X-Forwarded-Protovalues (such asftporws) when the list mixes patterns with and without aprotocol -
#18686
62bb716Thanks @astro-factory! - Fixesastro builddeleting the license file generated by Vite'sbuild.licenseoption. Astro now removes only its own Vite manifest from the.vite/output folder. -
#18629
e9916e1Thanks @decrek! - Fixes spreading an object onto an element with scoped styles changing that object. When the same object was spread on every render, for example a constant imported from another module, itsclassgrew with every request. -
#18641
08e2ceeThanks @astro-factory! - Tightens howsecurity.allowedDomainsvalidates theHostandX-Forwarded-Hostheaders. Only a plain hostname with an optional port is accepted, and the validated host is applied toAstro.urlexactly as it was matched. -
Updated dependencies [
d13beeb,e9916e1]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18621
8a61493Thanks @marcalexiei! - Fixes the dev toolbar's audit freezing an image's CSS animations in Safari, by reading the image's size from the request that loaded it instead of fetching it again -
#18691
f787792Thanks @ematipico! - Improves startup time ofastrocommands by loading SVGO only whensvgoOptimizer()optimizes an SVG, instead of wheneverastro/configis imported -
#18678
ea63d76Thanks @astro-factory! - Fixes duplicate CSS loading for hydrated islands that share modules or are imported through a path alias. The client build no longer emits and preloads stylesheets that are already linked on the page by the server build. -
Updated dependencies [
57137ed]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18681
bf1828bThanks @astro-factory! - Fixes static builds skipping or failing on pages whosegetStaticPaths()params contain characters like%or\, and warns when a prerendered page is skipped because it returned an empty error response -
#18630
c904827Thanks @astro-factory! - Fixes bundled scripts and hydrated islands being blocked whensecurity.csp.scriptDirective.strictDynamicis enabled. Astro now adds the hash of every bundled script toscript-srcand renders an import map with theirintegrityin the<head>. -
#18611
f98e8a8Thanks @matthewp! - Fixes bundling of a<script src>that uses a root-relative path to a project file outsidesrc/, such as/lib/analytics.ts. The error asking foris:inlineis now shown only when the path points to a file inpublic/. -
#18688
1999c84Thanks @astro-factory! - Fixes errors thrown after a page has started streaming bypassing the configuredlogger. They are now reported once through it, as oneerrorrecord, in both production andastro dev -
Updated dependencies [
c904827,5083c65,1999c84,5083c65,f98e8a8,f98e8a8]:- @astrojs/[email protected]
- @astrojs/[email protected]
- #18616
d747a53Thanks @florian-lefebvre! - Updates CLI argument parsing
7da442bThanks @matthewp! - Fixes the image endpoint treating directories whose names differ only by letter case as being inside the build output directory on case-sensitive filesystems- Updated dependencies [
7da442b]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18565
cd09986Thanks @praveen-kumary! - Avoids attributing client-only components or scripts to unrelated pages importingastro:i18nby bounding top-level page graph traversal at virtual page entries -
#18608
babd96dThanks @umeraamir69! - Fixes an extra page reload on the first page load after startingastro devwithout an existing.astrodirectory -
#18589
402c0faThanks @astro-factory! - Fixesastro checkexiting with code 0 when@astrojs/checkortypescriptis not installed. The command now exits with code 1 so CI fails instead of silently skipping type checking. -
#18503
54fcdd5Thanks @SwastikTripathi! - Preserves the last-modified date of cached font files and unchanged public files when copying them into the build output. Public-file timestamp preservation respects the resolved public-directory configuration, follows source symlinks, and avoids backdating files overwritten by build plugins. -
#18605
76cd239Thanks @astro-factory! - Fixes theglob()loader adding files from a folder excluded with a negation pattern such as!_docswhen they change duringastro dev -
#18432
ed60d82Thanks @alexmv! - Improves theMissingSharperror to include the reason Sharp failed to load, such as its prebuilt binaries not supporting the current CPU -
#18474
59543c3Thanks @miottid! - Fixes i18n fallback for on-demand rendered pages. A locale-prefixed request for a page that only exists in the fallback locale (for example/de/aboutwithfallback: { de: 'en' }) was answered with status302and noLocationheader. Such requests are now rewritten or redirected to the fallback locale according toi18n.routing.fallbackType, including encoded paths and sites with a configuredbase. Query strings are preserved, and explicit page statuses and redirects are left unchanged. -
#18541
cfa2d2bThanks @ump45nose! - FixesmatchAllRoutesto considerfallbackRoutes, matchingmatchRouteand the production router. Dev-server i18n fallback requests now resolve to the source route's metadata instead of the 404 route, and SSR-only fallback candidates can fall through the prerender handler. -
#18602
d856064Thanks @astro-factory! - Fixesastro checklosing the end of its output, including theResultsummary, when stdout is piped to a slow reader. When the reader closes the pipe early, for exampleastro check | head,astro checknow exits with code 1 instead of crashing with anEPIPEstack trace. -
#18574
da0f149Thanks @astro-factory! - Fixes an unnecessary full page reload inastro devwhen a content loader callsstore.clear()orstore.delete()and the content store has no asset imports -
#18570
e71c038Thanks @astro-factory! - Fixes pages using<ClientRouter />briefly showing the top of the page on reload before jumping back to the previous scroll position. Full reloads now use the browser's native scroll restoration. -
#18531
f75553bThanks @praveen-kumary! - Fixes an unhandledTypeError: Cannot convert undefined or null to objectwhen callingroute.generate()without arguments on static routes
-
#18558
fac3c50Thanks @astro-factory! - Fixesastro dev statusand other background server commands deleting the lock file of a running dev or preview server when run from a sandbox or as another user that is not permitted to signal its process -
#18559
10dae2fThanks @astro-factory! - Fixesimport.meta.envvalues containing$sequences (such as$$or$&) being corrupted inastro buildwhen server code reads theimport.meta.envobject directly, for example withconst { MY_SECRET } = import.meta.env -
#18544
e3bec3dThanks @skezo! - Fixes request paths with invalid percent-encoding (e.g./%C0%AFor a bare%) being logged as anInvalid URL encodingerror and routed with the undecoded path. These requests now return a400, the same as a path that is encoded too many times. -
#18520
e023abaThanks @matthewp! - Makes rendering of string tag names stricter and consistent across.astrodynamic tags, JSX, and MDX. Only the leading part of the string that is a valid element name is rendered, so characters such as/or=can no longer change the generated markup. A string that does not start with a valid element name (for example'!--'or'') now throws an error instead of producing invalid HTML.
- #18344
df838daThanks @edmundhung! - Allowsastro addto configure tagged versions of official adapters
-
#18488
e4e25faThanks @umeraamir69! - CSP no longer hashes empty children on external stylesheets and scripts, which was inserting the SHA-256 of the empty string intoscript-srcandstyle-src. -
#18500
e5a3a1bThanks @astro-factory! - Fixes<Image>and<Picture>emitting duplicatesrcsetcandidates whendensitiescontains equivalent values such as1and'1x' -
#18517
c3185b7Thanks @okxint! - Fix unhandledAbortErrorrejection whenClientRouterskips a pending view transition -
#18497
c712113Thanks @astro-factory! - Fixes an uncaughtTypeErrorin the browser when aserver:deferisland request fails due to a network error. The fallback content is kept, as it is for non-200 responses. -
#18525
d0240b9Thanks @astro-factory! - Fixes aDEP0190deprecation warning printed byastro infoon Node.js 24 and later -
#18522
776b9a6Thanks @astro-factory! - FixesmemoryCache()serving an empty body for cached pages that return an empty404or500response. These responses now render the404or500error page on every request. -
#18511
d060ff9Thanks @astro-factory! - Fixestransition:namestyles missing in dev when the element is inside a component that is only rendered through another component with no styles or scripts -
#18494
5fe699cThanks @astro-factory! - Fixes theastroCLI refusing to run on StackBlitz by allowing Node.js>=22.22.0inside WebContainers, whose Node.js version users cannot change -
#18506
bf43a60Thanks @astro-factory! - Fixes<ClientRouter />animating scroll restoration on back/forward navigation whenscroll-behavior: smoothis set. Saved scroll positions are now restored instantly, matching the browser's native behavior. -
#18476
8ea79a2Thanks @astro-factory! - Fixes aDataCloneErrorcrash when building pages that render SVG imports with<Image />orgetImage()whileexperimental.parallelPrerenderis enabled. -
#18504
6dbd737Thanks @astro-factory! - Fixes<Picture>emitting a duplicate1xcandidate in<source>srcsetwhendensitiesincludes1 -
#18524
7524889Thanks @astro-factory! - Fixes type errors reported in Astro's built-in<Image />,<Picture />,<Code />,<Debug />and<ClientRouter />components when type-checking a project that extendsastro/tsconfigs/strictestwithtscand@astrojs/ts-content-mapper -
#18493
3773941Thanks @astro-factory! - Fixes scoped styles of unused Astro components being included in the build when those components are re-exported from a barrel file -
#18512
1151b9eThanks @jp-knj! - Fixes CSP hashes added withAstro.cspfrom components rendered inside<body>being left out of the CSP<meta>element in static builds, including MDX pages -
Updated dependencies [
6cf3423,edfbf4a]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18430
dda9ec3Thanks @Abhirup-99! - Speeds up content sync withexperimental.collectionStorage: "chunked"by computing each character's UTF-8 width from its code point instead of encoding every character throughTextEncoder. On a store of ~44k entries this cuts the chunking step from about 60 seconds to well under a second, with byte-identical output. -
#18438
5e0eaa4Thanks @astro-factory! - Fixesastro devwith@astrojs/cloudflarefailing withCalling `require` for "node-fetch"when a server dependency such ascross-fetchrequiresnode-fetch -
#18376
a4e201dThanks @okxint! - Fixesastro devtreating a stale lock file containing a Linux thread ID as a running Astro server. A successful process lookup with no matching PID now marks the lock as stale, preventingastro dev stopandastro dev --forcefrom killing the unrelated process that owns the thread. -
#18467
d1fb7d3Thanks @astro-factory! - Fixes thedefineConfig()types fori18n.defaultLocale,i18n.fallback, andi18n.domainsso they accept a custom locale'spathinstead of itscodes, matching how Astro validates and uses these values -
#18475
cf27e70Thanks @ematipico! - Bumps the minimum supported Node.js version to 22.23.4, which includes the fixes from the October 2026 Node.js security releasesThis is a patch release because the Node.js support and upgrade policy allows the Core team to raise the minimum Maintenance LTS version in a patch release when a disclosed and fixed Node.js security flaw affects Astro.
-
#18451
7a0ba6fThanks @DenisCDev! - Fixesastro sync,astro checkandastro buildreplacing the optimized dependencies of a dev server running in the same project, which broke framework islands in that dev server until it was restarted with--force -
#18336
e943003Thanks @astro-factory! - Fixes inline styles in dev so that framework-transformed CSS is used, such as scoped styles andv-bind()in Vue single-file components -
#18399
829fc00Thanks @astro-factory! - Fixes a dev server error (Could not find server component name) for aserver:deferisland that importsastro:actionsorastro:config/server, when its page was not the first island page loaded after starting the server -
#18330
4db9e0dThanks @Samuteg! - Fixes theastro:env/servervirtual module being generated with invalid JS in dev when any environment variable contains$replacement patterns ($`,$&,$',$1, …). The inlined env JSON was passed as a string toString.replace, so e.g. theKITTY_PUBLIC_KEYvalue set by default in Kitty terminals corrupted the module and broke dev withFailed to parse source for import analysis -
Updated dependencies [
cf27e70]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18425
6fdc36eThanks @astro-factory! - Preserves the last modified date of cached optimized images and incrementally restored build output when copying them into the build output on all platforms -
#18419
395d195Thanks @astro-factory! - Fixes a typo in the error message shown when a fontcssVariableis invalid -
#18401
484822fThanks @danielmlr! - Fixes a bug where projects whose path contains an apostrophe (') failed to load sessions, middleware, a cache provider, or asrc/fetch.tshandler -
#18407
a6e00beThanks @astro-factory! - Fixes aTSCONFIG_ERRORduringastro buildwhen a parent directory contains atsconfig.jsonthat cannot be resolved, such as one extendingastro/tsconfigs/strictwithout installed dependencies -
#18427
908f167Thanks @astro-factory! - Fixes anUnterminated stringbuild error when application code imports fromastro/config(for example,fontProvidersin a shared fonts module) -
#18428
40e7d54Thanks @astro-factory! - Fixes missing styles in production builds for conditionally rendered framework components (e.g. Svelte components inside{#if}blocks) imported by a hydrated island -
#18424
617ff59Thanks @astro-factory! - Fixes style-only HMR in.astrocomponents 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 -
#18274
70834bbThanks @Princesseuh! - Fixes increasing memory usage when editing the Astro configuration while the dev server is running
-
#17894
b7a1bd9Thanks @Princesseuh! - Adds a new--timingsflag toastro buildto 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
--timingsflag 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.
-
#17830
a937b0dThanks @florian-lefebvre! - Adds a new optionalgetFontProperties()callback to font providersFont 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'], }), };
-
#17830
a937b0dThanks @florian-lefebvre! - Adds afetch()function to the font providerinit()contextThis 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); }, // ... }; }
-
#18015
0b30239Thanks @florian-lefebvre! - Addsexperimental.redirectPage, letting you provide your ownsrc/pages/3xx.astroin place of the redirect page Astro generates in static builds.A static site has no server to send an HTTP
Locationheader, so Astro generates a small HTML page with a<meta http-equiv="refresh">tag for each redirect it builds:- Your
redirectsentries 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 atto, 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.
- Your
-
#18265
910ee69Thanks @astro-factory! - Adds anotFound()handler toastro/fetchandastro/honothat renders the custom 404 page when no route matches, including a prerendered404.astroAdd it before
pages()in a custom worker or server entrypoint that does not run insideApp.render, such as a Hono app used directly as a Cloudflare worker. Without it,pages()andmiddleware()return an empty 404 with an internalX-Astro-Errorheader 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;
-
#18177
7d814e5Thanks @Princesseuh! - Adds support for separatebuildandruntimeimage servicesimage.servicenow also accepts abuildand aruntimeservice. Thebuildservice optimizes images on prerendered pages when you build your site, and is also used during development. Theruntimeservice 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' }, }, }, });
config.image.servicekeeps the shape the user configured it with. When a project setsbuildandruntimeservices,config.image.service.entrypointandconfig.image.service.configareundefined.If your integration reads
image.service, check for theruntimeproperty 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.servicewithupdateConfig()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 usesbuildandruntimeservices replaces both. -
#18277
2715958Thanks @florian-lefebvre! - Increases the minimum Node.js version to 22.22.0The 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.
-
#18313
71e2b24Thanks @matthewp! - Allows integrations to control where Astro writes client, server, and prerender build output.Custom prerenderers can access the final output locations through the new
outputDirectoriescontext:setPrerenderer((defaultPrerenderer, { outputDirectories }) => { const { client, server, prerender } = outputDirectories return createPrerenderer({ defaultPrerenderer, client, server, prerender, }) })
-
#18177
7d814e5Thanks @Princesseuh! - Lets custom prerenderers report the images used on prerendered pagesAstro now generates images on prerendered pages from the image information that a prerenderer's
getStaticPaths()andrender()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 plainResponsefromrender()still works, but is deprecated: images used on those pages are not generated. -
#17932
b905ff1Thanks @Princesseuh! - Adds support for experimental parallel prerenderingThis experimental feature makes
astro buildrender 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
workersto 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.concurrencysetting 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.
-
#18313
71e2b24Thanks @matthewp! - Fixes deployment integrations being unable to use Vite manifests when preparing build output -
#18270
0c3bf11Thanks @ArmandPhilippot! - Fixes the JSDoc for CSP utilities to point to the render context reference in docs. -
#18368
1f04637Thanks @43081j! - Replaces internal use offind-procwithtinyps. -
#18355
59b9cc0Thanks @matthewp! - Fixes prerender errors being silently swallowed when using a customsrc/fetch.tswith 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. -
#18177
7d814e5Thanks @Princesseuh! - Fixes original images being kept despite onlywidthorheightbeing read. -
#18353
af54bfaThanks @astro-factory! - Fixesglob()loader swallowing rendering errors during content sync, which allowedastro buildto exit successfully (code 0) even when a remark/rehype plugin threw an error -
#18271
23e8e28Thanks @ArmandPhilippot! - Fixes thesynccommand description inastro help, which only mentioned content collections. -
Updated dependencies [
b7a1bd9,2715958]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#18293
28e7410Thanks @astro-factory! - FixesAstro.cachebeingundefinedwhen 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 -
#18298
0e9e857Thanks @matthewp! - Fixesastro addremoving existingallowBuildsapprovals frompnpm-workspace.yamlwith pnpm v11.0–v11.22 -
#18263
882dd98Thanks @florian-lefebvre! - Refactors internal bundling and code transforms to use Vite's Oxc-basedtransformWithOxcand Rolldown instead of esbuild. These packages no longer depend on esbuild directly. -
#18290
31f13c3Thanks @astro-factory! - Fixes theglob()loader not reloading changed files in dev when the pattern starts with an extglob such as!(drafts)/**/*.md
-
#18266
cba76ccThanks @astro-factory! - Fixes a build error when a Markdown content collection entry loaded withglob({ deferRender: true })has alayoutfrontmatter property.layoutis now ignored for content collection entries, as documented. -
#18287
38f6793Thanks @astro-factory! - Fixesastro add cloudflarefailing to install dependencies with pnpm v11+ by approving theworkerdbuild script, and shows the package manager's error output whenastro addfails to install dependencies -
#18222
fcf6ed6Thanks @mingjunlu! - Fixes an issue where AVIF images were served asimage/heifinstead ofimage/avifin the dev server. -
#18240
de4df06Thanks @astro-factory! - Fixes thecache()handler fromastro/honoandastro/fetchthrowing aTypeErrorwhen a cache provider is configured. It now registers the cache provider before rendering, soAstro.cacheis available to downstream handlers likepages(). -
#18268
547b572Thanks @astro-factory! - Fixessecurity.checkOriginrejecting cross-origin requests with non-form content types such asapplication/json. As documented, the check only applies to unsafe requests that have nocontent-typeheader or one ofapplication/x-www-form-urlencoded,multipart/form-data, ortext/plain.
-
#18166
5134d0fThanks @astro-factory! - Fixes an intermittent dev server crash when usingastro:actionsinside a server island with adapters that use a pre-bundled SSR environment (e.g.@astrojs/cloudflare) -
#18076
8a2df66Thanks @astro-factory! - Fixes stale scoped styles during HMR when both markup and<style>are changed in a single save -
#18252
2d29e7eThanks @astro-factory! - Fixes CSS from other pages leaking into a page's<head>in dev when the page imports a module such asastro:config/server. -
#18000
6724575Thanks @barclayd! - Fixes a bug where server islands containing framework components rendered empty in the dev server when using a customsrc/fetch.ts -
#18241
7c5fd6fThanks @astro-factory! - Fixes the composablei18n()handler fromastro/fetchandastro/honoreturning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matchingastro(). -
#18164
1a6997fThanks @astro-factory! - 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. -
#18243
dd29d62Thanks @astro-factory! - Fixescontext.propsbeingnullin middleware and endpoints when the composableastro/honoorastro/fetchactions()handler runs beforemiddleware(), or whenpages()runs withoutmiddleware() -
#18193
95d5d16Thanks @astro-factory! - Fixesastro buildfailing on Windows with Node.js 25+ withERR_INVALID_ARG_VALUEwhen clearing the output directory hits a transientEPERMerror -
#18220
d6c13a4Thanks @astro-factory! - Fixes type errors reported in Astro's built-in<Picture />and<Font />components when type-checking a project withtscand@astrojs/ts-content-mapper -
#18133
faac481Thanks @astro-factory! - Fixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode -
#18146
2af4516Thanks @astro-factory! - Fixes CSS imported from aninjectScript('page')script being dropped during build -
#18159
e5f8fe0Thanks @astro-factory! - Fixes a hang when aserver:defercomponent is inside a slot of another component in an MDX content collection entry -
#18246
c3b42adThanks @astro-factory! - Fixes theglob()loader skipping content files whose paths contain#or? -
#18248
b97184eThanks @astro-factory! - Fixes a bug where page routes added withinjectRoute()returned a 404 wheni18n.routing.prefixDefaultLocalewastrueand the route path had no locale prefix -
#18251
3415263Thanks @astro-factory! - Fixes content collection changes being ignored inastro devafter the dev server restarts because of a config change -
#18226
ad54af0Thanks @imharjot! - FixesAstro.cookies.get()returningundefinedfor request cookies with empty values -
#18155
37ab0e4Thanks @astro-factory! - Fixes nondeterministic ordering of the server manifest'sassetsarray, ensuring builds with identical inputs produce byte-identical output -
#18099
6987261Thanks @renovate! - Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc. -
#15595
64e4039Thanks @qzio! - Improves CSRF protection by taking modern browsers headers into account -
#18215
941bd5eThanks @ump45nose! - Fixes a runtimeReferenceErrorfor 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. -
#18179
6caa659Thanks @matthewp! - 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. -
#18250
7eae39bThanks @astro-factory! - 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 -
#18176
7c9d00dThanks @astro-factory! - Fixes duplicate CSS in production builds when a component is both server-rendered and used withclient:onlyon the same page -
#18245
492e95fThanks @astro-factory! - Fixes the composableastro/fetchandastro/honohandlers (trailingSlash(),redirects(),actions(),middleware(), andpages()) so they reject over-encoded request paths with a400 Bad Request, matchingastro(). For these requests,redirects()andactions()return the400response instead ofundefined, so no redirect is issued and no action runs. -
#18078
0a2ab10Thanks @manuelgruber! - FixesAstro.rewrite()andcontext.rewrite()selecting the wrong route inastro devwhen two dynamic routes match the same path -
#18210
62b13baThanks @edmundhung! - Allows Astro CLI commands to install tagged package versions -
#18069
d39eb97Thanks @astro-factory! - Fixes a dev server dependency scan failure when an.astrofile contains a literal<scriptin frontmatter or a template expression -
#18114
c17d920Thanks @matthewp! - Fixes Astro on StackBlitz and other WebContainer environments -
#18088
cb767f9Thanks @astro-factory! - Fixes aMODULE_LEVEL_DIRECTIVEwarning during build caused by a stale"use astro:head-inject"directive in content collection propagated asset modules -
#18247
2b3f73dThanks @astro-factory! - Fixes actions returning 500 for malformed JSON request bodies and undecodable action names. ASyntaxErrorfrom invalid JSON now returns 400 (BAD_REQUEST), and aURIErrorfrom a malformed percent-encoded action name now returns 404 (NOT_FOUND). -
1d9e910Thanks @matthewp! - Validates theHostheader againstsecurity.allowedDomainswhen using the Node adapter -
#18249
c7799a4Thanks @astro-factory! - Fixes thefontsourcefont provider to resolve variable fonts when using the "Variable" suffix in the font name (e.g."Inter Variable") -
#18163
e48da9dThanks @astro-factory! - Fixes<video muted>losing its muted state after a ClientRouter navigation in Chrome -
#18244
f67e7f7Thanks @astro-factory! - Fixes localized error pages such assrc/pages/pt/404.astroreturning a200status when rendered through thepages()handler fromastro/fetchorastro/hono -
#18242
c5275e3Thanks @astro-factory! - Fixesexperimental_AstroContaineroutput including dev toolbardata-astro-source-fileanddata-astro-source-locattributes when rendering components under Vitest -
Updated dependencies [
6987261,62b13ba]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17736
2b8b2e8Thanks @ematipico! - Adds a new container function calledrenderComponent(), which renders Astro components with inlined styles and scripts.Users must import the component with the new
?containerquery 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);
-
#18063
40896acThanks @adamchal! - Fixes incremental builds repeatedly rendering unchanged pages when modules or compiled CSS reference bundled assets. -
#18053
cf5d72fThanks @Princesseuh! - Improves theastro checkerror 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. -
#18086
795a7e4Thanks @ump45nose! - Fix double-escaped ampersands in Markdown imagealtandtitleattributes. The__ASTRO_IMAGE_round-trip now decodes the numeric (&) and named (&) character references the Markdown processors emit, so an&in an alt or title is escaped exactly once in the final HTML instead of twice. -
#18074
0429805Thanks @SurefireStudios! - Fix three error names that did not match their documented reference.MissingLocale,MissingIndexForInternationalizationandNoManifestAvailablereported names ending inErrorin 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. -
#18007
2245837Thanks @L4XB! - Fixes the dev server re-evaluating the whole server module graph on every request. Theastro:head-metadataplugin invalidated its component metadata virtual module from its owntransformhook, 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. -
#18096
43657c4Thanks @matthewp! - Fixes domain-based i18n routing to respectsecurity.allowedDomainswhen selecting a locale from request host headers -
#18043
8a53a8bThanks @astro-factory! - Fixesimage.responsiveStylesemitting invalidobject-positionCSS values for same-axis keyword pairs (top bottom,left right, etc.) -
#18029
c08252dThanks @matthewp! - Runsastro devandastro previewin the foreground when an AI agent is detected on Windows, allowing the agent to manage the process lifetime. Pass--backgroundexplicitly to request an Astro-managed background process. Agent-inferred backgrounding remains enabled on other platforms. -
Updated dependencies [
3fd16ee,8358d59]:- @astrojs/[email protected]
-
#17651
504333cThanks @sxzz! - Refactors internal version handling to use a smaller, ESM-native dependency -
#17942
0bc5715Thanks @matthewp! - Returns appropriate 400 and 404 responses from the image endpoint for invalid and missing local image paths -
#17700
b2222fcThanks @winklemad! - FixesAstro.preferredLocaleListreturning 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 asen-USmatching a configureden-us -
#17941
394ff79Thanks @matthewp! - Fixesastro preview --ignore-lock(andastro 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--backgroundcombined with--ignore-lockstill errors. -
#17928
3277927Thanks @ArmandPhilippot! - Fixes TypeScript autocompletion forgetImage()to suggest all available predefined options. -
#17928
3277927Thanks @ArmandPhilippot! - Fixes a type error ingetImage()options that allowed passing bothwidthsanddensitiesat the same time. -
#17857
2637ed1Thanks @Princesseuh! - Improves rendering performance -
#17943
2fc7ce9Thanks @matthewp! - Fixes a WebAssembly error when importingastro:actionsin tests that run under@cloudflare/vitest-pool-workers -
#18018
1b5a234Thanks @astro-factory! - Fixes trailing-slash redirect response body pointing to the incoming URL instead of the redirect target. Thelocationheader 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. -
#17905
eaf70faThanks @SudoDevStudio! - Fixes custom dev toolbar apps losing their UI after client-side navigation with<ClientRouter />. -
#18011
558b301Thanks @astro-factory! - Fixes prerendered Cloudflare pages rendering as[object Object]whennodejs_compatis enabled inwrangler.toml -
#17944
ba08e35Thanks @matthewp! - Fixes a regression inastro devwhere writes outside the module graph (for example,@astrojs/cloudflare's.wrangler/statefiles) invalidated the middleware on every request, causing repeated SSR reloads. Such writes no longer invalidate the middleware. -
#17531
ae837dbThanks @danilloestrela! - Updatessvgoto4.0.2to resolve a security advisory -
#17953
dbbf10eThanks @astro-factory! - 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. -
#17955
4e8ad9aThanks @matthewp! - 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, cuttingastro devready time by roughly a third on projects with a content config. -
#17960
9838049Thanks @Chy-Zaber-Bin-Zahid! - Improves the diagnostics of some Astro errors. -
#17998
0e5478dThanks @astro-factory! - Fixes SVG<style>elements nested inside<defs>or other container elements not being hashed for CSP -
#17994
80f9f1dThanks @astro-factory! - Fixesexperimental.incrementalBuildrestoring pages with stale CSS after a preprocessor partial changes or missing original images referenced by restored pages -
#17889
8ae6b46Thanks @ajfAfg! - Fixes a bug where the dev server stripped the configuredbasefrom URLs that only share a prefix with it. Withbase: '/s', requests to/src/...were rewritten to/rc/...and failed, breaking those pages during development. -
#17980
cfccafaThanks @gameroman! - Improves JSDoc for fonts api -
#17953
dbbf10eThanks @astro-factory! - Fixes CSS HMR for framework components rendered through content entries afterClientRouternavigation -
#17970
0b4dc3aThanks @matthewp! - Improves serialization of transition animation values in generated CSS -
#17999
30ef3cbThanks @astro-factory! - Fixes content collection HMR not updating prerendered pages when an adapter enables a separate prerender environment (e.g.@astrojs/cloudflarewithprerenderEnvironment: 'node') -
#18002
312ab49Thanks @shoutoutuoadi325! - Fixes redirect targets being corrupted when a dynamic route parameter value contains$replacement patterns like$& -
#17937
e294953Thanks @matthewp! - Fixes a bug where theglob()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. -
#17945
750b4dbThanks @matthewp! - 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).
-
#17896
a548223Thanks @matthewp! - 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. Useset:htmlto explicitly opt a dynamic value back into raw rendering. -
#17931
c1a6a89Thanks @astro-factory! - 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 -
#17908
42e9188Thanks @astro-factory! - Fixes i18n fallback routing replacing the first substring match instead of the actual locale segment, which mangled paths like/energy/en/aboutinto/esergy/en/about -
#17936
4b92ddcThanks @astro-factory! - Fixes sessions breaking in dev mode with the Cloudflare adapter when middleware is present -
Updated dependencies [
a548223]:- @astrojs/[email protected]
- #17899
0389640Thanks @ematipico! - Fixes an error that prevented projects usingastro:assetsfrom starting or building
-
#17767
ce7c91fThanks @astro-factory! - Adds--ignore-lockflag toastro 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. -
#17818
c0b6581Thanks @florian-lefebvre! - Adds aloggerparameter to image services hooksCustom image services now receive Astro's runtime logger as an extra argument. Messages logged with it are routed through the destination configured in
loggerand 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.
-
#17818
c0b6581Thanks @florian-lefebvre! - Addsloggerto the context object passed to cache providersCustom cache providers now receive Astro's runtime logger on the context passed to
onRequest(). Messages logged with it are routed through the destination configured inloggerand 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.
-
#17818
c0b6581Thanks @florian-lefebvre! - Updates Astro's remaining internal warnings and errors to be written through the configured logger instead of directly to the console, when possible -
#17886
e747cbaThanks @matthewp! - Fixes the memory cache provider to skip responses withVary: CookieorVary: * -
#17885
916b738Thanks @Princesseuh! - Improves build performance for sites with a large number of pages coming from a large amount of different modules. -
#17795
15e2debThanks @matthewp! - Adds concurrent rendering support forexperimental.incrementalBuild, including when using@astrojs/cloudflareIncremental builds no longer disable caching when
build.concurrencyis greater than1. Projects that setbuild.concurrency: 1to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages. -
#17879
21c34a6Thanks @matthewp! - Fixes missing styles, links, and scripts from content collection entries rendered inside server islands -
#17861
3193988Thanks @ethanstoner! - 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 assrc/pages/en/enterprise.astrowithfallback: { es: 'en' }produced the route/es/esterpriseinstead of/es/enterprise, so the fallback never matched the intended URL. Only the leading locale segment is rewritten now.
-
#17262
f8e9458Thanks @Princesseuh! - Fixes@astrojs/markdown-remarkbeing pinned to an exact version. -
#17874
10c7e63Thanks @astro-factory! - Fixes SSR manifest placeholder not being replaced when the server build is minified, which caused a runtimeInvalid URLcrash at server boot -
#17869
2548abfThanks @ematipico! - Fixes a case where the logger was improperly initialized at runtime in dev. -
#17878
76eff3dThanks @ematipico! - Fixes browser heuristic caching for cached responses that includeLast-ModifiedorETagvalidators -
#17833
413a6e7Thanks @astro-factory! - 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 -
#17872
f7191ccThanks @jx-grxf! - Fixes Markdown images in content collections rendering an emptysrcsetattribute when no responsive candidates are generated. -
#17755
157c500Thanks @matthewp! - Fixes a bug where editing a content collection entry duringastro devon 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. -
Updated dependencies [
f8e9458,f8e9458]:- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17846
b441180Thanks @Princesseuh! - Fixes importing.htmlfiles not being typed outside of.astrofiles -
#17831
32e8b44Thanks @astro-factory! - Fixes a crash when requesting/index.htmlagainst a dynamic page route like[slug].astro -
#17841
c35448eThanks @astro-factory! - Fixes SSR manifest containing staleentryModulesreferences to prerender-only chunks that no longer exist in the final build output -
#17847
eb87a23Thanks @matthewp! - Fixesset:textescaping in MDX script and style elements
-
#17837
ecb4082Thanks @matthewp! - Updates the minimum supported version of Sharp to 0.35.4 -
#17786
db7c53bThanks @gameroman! - Replaces the internalfind-processdependency with a smaller, lighter alternative
-
#17415
55d38c8Thanks @iseraph-dev! - Deserializes each route once when loading the SSR manifest -
#17772
023b48bThanks @matthewp! - Fixes route selection for normalized request paths in adapter and development request handling -
#17819
633855bThanks @matthewp! - Updates generated and default Cloudflarecompatibility_datevalues to match the installed runtime and requires Wrangler^4.125.0 -
#17813
ae26d18Thanks @matthewp! - Fixesrewrite()andnext(payload)for GET and HEAD requests with host-provided bodies -
#17816
a0d2fe3Thanks @astro-factory! - Fixes the experimentalsvgOptimizernot generating unique per-file ID prefixes when using SVGO'sprefixIdsplugin
- #17812
29af6daThanks @matthewp! - Fixes a bug wherenew FetchState(request)could fail in development when server dependencies were optimized
-
#17758
5f419e2Thanks @astro-factory! - Fixes a bug whereexperimental_getFontFileURL()rejected valid font URLs when using the Cloudflare adapter -
#17416
493796bThanks @iseraph-dev! - Skips no-op pathname writes when normalizing SSR request URLs -
#17712
bd374b7Thanks @fkatsuhiro! - Updates deprecation messages target from Astro 7 to 8 -
#17719
dac1768Thanks @astrobot-houston! - Fixes session ID validation to reject non-UUID cookie values before using them as storage keys -
#17770
84eb7e7Thanks @astro-factory! - Fixes--mode,--site,--base,--out-dir,--verbose,--silent, and--openflags being silently dropped when usingastro dev --backgroundorastro preview --background -
#17713
d035290Thanks @wakqasahmed! - Fixescontent-modules.mjsnot removing entries for deleted or renamed content files, which could cause Vite to attempt to resolve non-existent modulesAs part of this fix,
#moduleImportsis now fully rebuilt fromdeferredRenderentries before every write, so a module import added only through the publicaddModuleImport()API without a correspondingdeferredRenderentry in the store will no longer be preserved across writes. -
#17743
adc750fThanks @contactjawad! - FixesAstro.preferredLocaleandAstro.preferredLocaleListignoringAccept-Languagequality values when they are absent or0. An entry without an explicitq=now correctly counts as quality1.0(per RFC 7231) and an entry withq=0is treated as not acceptable, so the highest-quality locale is selected regardless of header order. -
#17757
660991cThanks @astro-factory! - 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 -
#17783
60b14ffThanks @matthewp! - Fixes a type error when passing an image from a content collectionimage()schema to a component or<Image />. The schema returned byimage()was missing theapngformat, so it no longer matched the type of an imported image. -
#17664
d483125Thanks @astrobot-houston! - 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. -
#17810
0fc5f65Thanks @florian-lefebvre! - Fixes a regression in the content collections that could cause images to not be resolved -
#17781
aa33b44Thanks @matthewp! - FixesmemoryCache()storing responses that set cookies throughAstro.cookiesorAstro.session -
#17787
6661fbeThanks @astro-factory! - Fixesserver:defercrashing the dev server with "undefined is not a function" when a deferred component imports fromastro:i18n -
#17750
dd0e3acThanks @dobrodob! - Fixes a regression wheretransition:persiststopped working for<audio>and<video>elements. -
#17774
fe1d16dThanks @astro-factory! - Adds support for importing.apngfiles as image metadata for use with standard<img>elements. Astro's image components reject APNG files to avoid removing their animation -
#17799
8797754Thanks @astro-factory! - Fixes i18nfallbackType: "rewrite"returning 500 instead of 404 when the fallback locale also has no matching static path for a prerendered dynamic route -
#17741
99d3d3dThanks @ericswpark! - Bumps the Astro compiler to the latest version. Changelog. -
#17782
3578d45Thanks @Princesseuh! - Improves the performance of the Astro CLI in local by enabling Node's module compilation cache. -
#17705
2043e4fThanks @astrobot-houston! - Fixes incremental builds serving cached HTML that references stale CSS filenames after a stylesheet-only edit -
#17754
3d50dfdThanks @astro-factory! - Fixes the dev server refusing to start in Docker containers after a restart due to PID reuse in the lock file check -
#17769
bbda94dThanks @astro-factory! - Fixes a build failure when definingvite.environments.ssrin the Astro config. User-provided environment config forssr,prerender, orclientis now properly deep-merged with Astro's internal environment settings instead of silently breaking the server entry naming. -
#17776
0874da8Thanks @astro-factory! - Fixes theglob()content loader failing to load files with colons in their names (e.g.,Guide: Architecture.md) -
Updated dependencies [
0762a83,0c99615]:- @astrojs/[email protected]
-
#17747
a90ff66Thanks @Princesseuh! - Fixes builds hanging when an image file is malformed -
#17701
05763a0Thanks @matthewp! - Fixes base path stripping to respect path-segment boundaries. With a configuredbasesuch as/docs, a request like/docs-archive/pageis no longer treated as being under the base, so routing andcontext.url.pathnamenow agree on the same pathname. -
#17742
70b449dThanks @Kjubikstronk! - Fixesastro buildthrowingTypeError: Missing parameterfor dynamic routes whenbuild.format: 'preserve'andtrailingSlash: 'always'are used together. Stripping the framework-injected.htmlsuffix dropped the trailing slash that the compiled route pattern requires, so the route no longer matched itself and its params resolved as empty. -
#17703
771b0a9Thanks @astrobot-houston! - FixesAstro.sitealways beingundefinedwhen rendering components via the Container API, even whensiteis set inastroConfig -
Updated dependencies [
05763a0,bc171af]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17724
97140b2Thanks @ematipico! - Fixes an issue where Astro could run out of memory whenexperimental.collectionStorageis set tochunkedand there are multiple concurrent updates to the same collection. -
#17636
51723b1Thanks @matthewp! - 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 -
#17636
51723b1Thanks @matthewp! - Fixes the composable request helpers (astro/fetch) throwing an error when used on a request that had been rewritten withAstro.rewrite()ornext() -
#17636
51723b1Thanks @matthewp! - Refactors Astro's internal server-side request handling. This is an internal change: all documented public APIs, includingAppandNodeApp, keep their existing signatures and behavior.The undocumented internal
app.pipelineproperty and theAppPipelineexport fromastro/apphave been removed. Adapters that usedapp.pipeline.getLogger()to wait for the configured log destination can call the newapp.getLogger()instead.As a result of this refactor,
new FetchState(request)fromastro/fetchnow works anywhere inside a built Astro server — including customsrc/fetch.tsentrypoints — without the request needing to first pass throughapp.render(). Previously this threw an error, breaking patterns like the Cloudflare adapter's advanced custom-worker setup. -
#17723
c3b9aedThanks @florian-lefebvre! - Fixes a link in font providers JSDoc annotations -
#17699
e28d227Thanks @ArmandPhilippot! - Fixes several documentation issues related to the JSDoc for configuration options.- When hovering over the
serverandfontsoptions, 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.
- When hovering over the
-
#17572
2066f39Thanks @matthewp! - Fixes a crash when a request arrives with a malformed port in theHostheader (for exampleexample.com:65536orexample.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. -
#17685
9f15609Thanks @astrobot-houston! - Fixes a dev server error where an SSR full reload triggered by a third-party Vite plugin (such as@tailwindcss/vite) could fail withFailed to load url astro:server-app.js -
#17636
51723b1Thanks @matthewp! - 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. -
#17631
cf29becThanks @matthewp! - FixesgetCollection()andgetEntry()throwingDataCloneErrorwhen a collection schema transform returns aTemporal.PlainDateor other class instance. -
Updated dependencies [
8c193f6]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17611
9bc3207Thanks @thelazylamaGit! - Fixes component styles rendered from content entries remaining stale until a second save when an adapter uses Astro's fallback development environment -
#17634
2267eeeThanks @astrobot-houston! - Fixes incremental builds dropping optimized images for cached pages when using acollectStaticImagesprerenderer (e.g.@astrojs/cloudflarewith compile-time image optimization) -
#17650
4cdf128Thanks @astrobot-houston! - Fixes intermittentImageNotFounderrors 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. -
#17683
2378221Thanks @astrobot-houston! - FixesprerenderConflictBehaviornot applying to content collection duplicate ID warnings in theglob()andfile()loaders. Setting it to'error'now throws during content sync, and'ignore'suppresses the warning. -
#17659
90c6ea4Thanks @astrobot-houston! - Fixes the Fonts API breakingexperimental.incrementalBuildcaching by embedding a build-local, randomly-assigned server port in generated code used for the dependency hash -
#17630
fd1d9eeThanks @ericclemmons! - Fixes incremental builds becoming prohibitively slow for sites with many pages or content entries that share a large dependency graph. -
#17690
93beeccThanks @NgoQuocViet2001! - Prevents files in directories whose names start withpagesfrom being treated as page routes -
#17671
09f0dc7Thanks @tarikermis! - Fixesastro devrefusing 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--forcedoes not signal the unrelated process.
-
#17612
7133730Thanks @thelazylamaGit! - Fixes CSS hot module replacement after navigating between pages withClientRouter -
#17628
4ada248Thanks @astrobot-houston! - Fixes a CSP violation when using bothsecurity.cspandexperimental.clientPrerenderwithdata-astro-prefetchlinks. 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 CSPscript-srcdirective at build time. -
#17605
89e4647Thanks @ashleigh-yeoman! - Fixes middleware HMR not responding to changes in imported modules. Previously, only direct edits to the middleware file would trigger a reload. -
#17582
bd2c1a5Thanks @astrobot-houston! - Fixes a regression where content collectionreference()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. -
#17661
97b0cc7Thanks @ArmandPhilippot! - Improves Markdown options documentation with links to the Markdown guide and official processors. -
#17349
4328c73Thanks @astrobot-houston! - Fixes an issue where requests handled by the dev prerender environment (e.g./_imagewith@astrojs/cloudflare'sprerenderEnvironment: '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 -
#17603
722eed6Thanks @astrobot-houston! - Fixes<video>and<audio>elements being non-functional after navigating via view transitions (<ClientRouter />) -
#17616
3a890d2Thanks @lazerg! - Fixesexperimental.incrementalBuildre-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. -
#17547
fba468cThanks @dmgawel! - ImprovesgetCollection()andgetEntry()performance for entries without local image references -
#17602
16e0d9dThanks @astrobot-houston! - Fixes a build error caused by hash collisions in generated content collection image import identifiers
-
#17174
0224a3aThanks @matthewp! - Adds theastro preview --backgroundflag 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 previewsubcommands:astro preview status astro preview logs astro preview logs --follow astro preview stop
If Astro detects that
astro previewis being run by an AI coding agent, background mode is enabled automatically. This matches the existing behavior forastro 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=0before runningastro preview. -
#17532
7f94895Thanks @florian-lefebvre! - Adds support for paths relative to your project root inlogger.entrypointPreviously, pointing
logger.entrypointat a custom log handler living in your own project required building an absoluteURL. 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, andURLentrypoints keep working as before. -
#17084
961bbe5Thanks @matthewp! - Widens theAstroPrerendererrender()return type so prerenderers can report incremental-build metadataA prerenderer's
render()may now resolve to either aResponse(as before) or aPrerenderResultobject 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
Responsecontinue to work unchanged, and in-process prerenderers can keep returning aResponsesince the build collects their metadata directly. -
#16871
90c98aeThanks @adamchal! - Addssession: falseinastro.configto opt out of session support. Projects that do not setsession: falsesee 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
sessionconfig at all - a
sessionconfig without a driver
Useful for serverless/edge runtimes where cold-start parse time is sensitive.
-
#17084
961bbe5Thanks @matthewp! - Adds experimental support for incremental static builds withexperimental.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 acacheKey.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { incrementalBuild: true, }, });
Return a
cacheKeyfor each generated page fromgetStaticPaths():--- 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 runningastro build.See the experimental incremental static builds documentation for more information.
-
#17084
961bbe5Thanks @matthewp! - Adds the optionaldigestproperty to content collection entries.Loaders can provide an opaque digest value that changes when an entry changes. This is now reflected in the
CollectionEntrytype returned bygetCollection()andgetEntry(), 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
digestcan be used as acacheKey.
-
#17534
5a5337eThanks @florian-lefebvre! - Improveslogger.entrypointreference docs -
#17529
d52a787Thanks @QVinto! - Fixesastro devcrashing withInvalid URLwhen--hostis set to a specific non-loopback addressVite only reports a
localURL 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 undernetworkandlocalwas empty, so writing the dev lock file threwInvalid URLand 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.
-
#17566
296248cThanks @astrobot-houston! - FixesfontProviders.googleicons()returning the full icon font (~3.9MB) instead of only the requested glyphs when multipleexperimental.glyphsare specified -
#17560
ef45de1Thanks @astrobot-houston! - FixesAstro.url.pathnamefor non-index pages when usingbuild.format: 'preserve'. Previously, a page likesrc/pages/about-me.astrowould output todist/about-me.htmlbutAstro.url.pathnamewould incorrectly return/about-me/instead of/about-me.html. -
#17573
0089f83Thanks @astrobot-houston! - Fixes a Content Layer build crash that could occur when another dependency causes an older version ofneotraverseto be hoisted to the project root -
#17571
116f700Thanks @astrobot-houston! - Fixes cookies set viaAstro.cookies.set()inside a custom404.astroor500.astroerror page being silently dropped from the final response -
#17579
3ea55ceThanks @bluwy! - Supports thedevEnginesfield in package.json when detecting the package manager for install commands -
#17422
e4e2037Thanks @jiwonyoon-dev! - Fixespopoverbeing rendered aspopover="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 barepopoverattribute (or omitted), regardless of the tag name.
-
#17536
ff97b86Thanks @dmgawel! - Fixes concurrent static builds failing to generate i18n rewrite fallbacks for dynamic routes -
#17383
296e1b0Thanks @thelazylamaGit! - Fixes stale dev CSS after editing component style blocks and CSS files in dev -
#17543
bbc1ec9Thanks @ematipico! - Adds a feature toexperimental.collectionStoragethat 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, }, }, });
-
#17545
5214663Thanks @ematipico! - Bumps the Astro compiler to the latest version. Changelog.
-
#17524
7613030Thanks @matthewp! - Fixes a bug where an error while finalizing a request could prevent a response from being sent -
#17480
f61ba9cThanks @florian-lefebvre! - Fixes a case where a customlogger.entrypointfailed to load at runtime in a built server bundle. -
#17525
e614b7bThanks @matthewp! - Fixes action path resolution so that properties of a resolved action function are not treated as routable path segments -
#17284
c775c1fThanks @matthewp! - 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 -
#17474
c895b12Thanks @nicksnyder! - Updates dependencyjs-yamlto v4.3.0 -
Updated dependencies [
c895b12]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17488
d4f266dThanks @emerson-d-lopes! - 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.cssand_..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. -
#17472
4dc590cThanks @astrobot-houston! - Adds the missingbackgroundprop to the<Image />and<Picture />component types. The prop already worked at runtime, but was absent from the types, causingastro checkto report thatbackgrounddoes not exist on the component props -
#17292
0fc519dThanks @astrobot-houston! - Fixes missing scoped styles for child components insideclient:onlyislands in production builds -
#17421
f1448deThanks @iamkaleemsajjad-hue! - Fixes session runtime errors being silently swallowed byconsole.errorinstead of routing through Astro's logger -
#17421
f1448deThanks @iamkaleemsajjad-hue! - Fixes a session being left in a partial state after a storage failure duringsession.regenerate(), preventing unnecessary storage reads on subsequent operations -
#17517
82bf7e2Thanks @Hashim1999164! - 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 withwindowsHide: true, so console-subsystem grandchildren (such asworkerd.exe) no longer get a new focus-stealing window allocated by Windows Terminal. -
#17510
eaa1fb0Thanks @astrobot-houston! - Fixes theglob()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 -
#17511
704e570Thanks @astrobot-houston! - Fixes TypeScript path aliases fromtsconfig.jsonnot resolving inastro.config.ts
- #17427
630b382Thanks @astrobot-houston! - Fixes image optimization duringastro buildusing too many parallel processes in CPU-limited containers. Builds now respect the container's CPU limit, reducing peak memory usage and avoiding out-of-memory crashes.
-
#17445
a5f7230Thanks @ocavue! - Updates dependencycookieto v2. Cookie values made entirely of URL-safe characters are no longer percent-encoded inSet-Cookieheaders; encoded values round-trip exactly as before. -
#17402
a89c137Thanks @farrosfr! - Fixes a bug where mutatedAstro.localsduring the request lifecycle are lost and not passed to custom error pages (404.astro/500.astro) -
#17405
91992efThanks @Araluma! - Prevents an unhandled promise rejection from the prefetchfetchfallback. In WebKit (Safari),<link rel="prefetch">is unsupported, so prefetch uses thefetch()fallback; on a flaky connection that fetch rejects withTypeError: Load failed, and because the promise was not awaited or caught, it surfaced as an unhandled rejection to the page's global error handlers. The best-effort prefetch now swallows the failure with.catch().
- #17399
4b03702Thanks @matthewp! - Fixes encoded request paths being routed incorrectly when using domain-based i18n
-
#17302
5f4dc03Thanks @astrobot-houston! - Adds a newdeferRenderoption to theglob()content loaderWhen set to
true, renderable entries (such as Markdown) are not rendered during content sync. Instead, rendering is deferred until the entry is actually rendered in a page, using the same on-demand path that.mdxfiles already use.This reduces memory usage during
astro buildfor large collections whose rendered output is much larger than the source — for example, Markdown that uses heavy rehype plugins likerehype-katex. Such builds could previously run out of memory while storing the eagerly-rendered HTML for every entry.// src/content.config.ts import { defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; const docs = defineCollection({ loader: glob({ pattern: '**/*.md', base: 'src/content/docs', deferRender: true }), });
By default
deferRenderisfalse, preserving the existing behavior of rendering entries eagerly during sync so their rendered HTML can be cached across builds. -
#17296
30698a2Thanks @ematipico! - Adds a new experimentalcollectionStorageoption for controlling how the content layer persists its data storeBy default, Astro serializes the entire content layer data store to a single file (
.astro/data-store.json). For very large content collections, this file can grow large enough to hit platform file-size limits.Set
experimental.collectionStorage: 'chunked'to instead split the data store across many smaller, content-addressed files inside a.astro/data-store/directory, described by a manifest:// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { collectionStorage: 'chunked', }, });
Because each part file is named by a hash of its contents, unchanged parts keep the same name across builds and are not rewritten, and identical parts are deduplicated. The default value is
'single-file', which preserves the current behavior. -
#17214
44c4989Thanks @ematipico! - Adds support for the more specific CSP directivesscript-src-elem,script-src-attr,style-src-elem, andstyle-src-attrthrough a newkindoption.Previously,
CSPwas only scoped to genericscript-src/style-srcdirectives. Now each source or hash can be scoped to a narrower directive — for example, to allow inlinestyleattributes (such as those fromdefine:varsor Shiki) without loosening the policy for your<style>and<link>elements.Each entry in
resourcesandhashescan be an object with akindproperty. Depending on whether you usescriptDirectiveorstyleDirective,"element"targetsscript-src-elemorstyle-src-elem,"attribute"targetsscript-src-attrorstyle-src-attr, and"default"(the same as a bare string or hash) targetsscript-srcorstyle-src.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ security: { csp: { scriptDirective: { resources: [{ resource: 'https://cdn.example.com', kind: 'element' }], }, styleDirective: { resources: [{ resource: "'unsafe-inline'", kind: 'attribute' }], }, }, }, });
The same
kindoption is available on the runtime CSP API, where the existing methods now also accept an object:ctx.csp.insertScriptResource({ resource: 'https://cdn.example.com', kind: 'element' }); ctx.csp.insertStyleResource({ resource: "'unsafe-inline'", kind: 'attribute' });
-
#17258
84814d4Thanks @astrobot-houston! - Adds a newformat()option to thepaginateutility. Theformat()option is a function that accepts the current URL of the page, and returns a new URL.For example, when your host only supports URLs using the
.htmlextension, you can useformat()to add it to the generated URLs:--- export async function getStaticPaths({ paginate }) { // Load your data with fetch(), getCollection(), etc. const response = await fetch(`https://pokeapi.co/api/v2/pokemon?limit=150`); const result = await response.json(); const allPokemon = result.results; // Return a paginated collection of paths for all items return paginate(allPokemon, { pageSize: 10, format: (url) => `${url}.html`, }); } const { page } = Astro.props; ---
-
#17331
7db6420Thanks @matthewp! - Adds a--ignore-lockflag toastro devfor starting a dev server without checking or writing the lock file, so it can run alongside an already-running dev server for the same project.The new instance is not tracked by
astro dev stop,astro dev status, orastro dev logs.--ignore-lockcannot be combined with--background(or an auto-detected AI agent environment, which runs dev servers in the background automatically) or--force, since those rely on the lock file.astro dev --ignore-lock
-
#17389
16de021Thanks @florian-lefebvre! - Allows passing URL entrypoints when configuring the loggerMatching other APIs like session drivers or font providers, the logger entrypoint can now be a URL:
import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { entrypoint: new URL('./logger.js', import.meta.url), }, });
-
#17332
4407483Thanks @astrobot-houston! - Fixes the JSON logger crashing withprocess is not definedin non-Node runtimes like Cloudflare's workerd. The JSON logger now usesconsole.log/console.errorinstead ofprocess.stdout/process.stderr, matching the pattern already used by the console logger. -
#17391
186a1e7Thanks @florian-lefebvre! - Fixes a case where an integration could not update the logger withupdateConfig() -
#17394
d9f99e1Thanks @matthewp! - Fixes element-specific CSP directives to preserve the existing behavior of configured script and style resources -
#17374
b2d1b3eThanks @astrobot-houston! - Fixes dev server returning 404 for?urlimported assets when accessed via browser navigation -
#17390
ed71eafThanks @florian-lefebvre! - Removes an unused and undocumented generic from theAstroLoggerDestinationtype -
#17393
092da56Thanks @matthewp! - Hardens generated transition styles, development metadata, and server island URLs when embedding dynamic values
-
#17286
a249317Thanks @astrobot-houston! - Fixes the first browser visit afterastro devstarts triggering an immediate full page reload -
#17369
a94d4a5Thanks @adamchal! - Fixes an issue where a client island could permanently fail to hydrate if the first attempt to load its component failed. Islands now reliably recover from transient import failures, which previously did not work for React components duringastro dev.
-
#17363
3f4efc5Thanks @astrobot-houston! - Fixesastro preview --opennot opening a browser when using an adapter with a custom preview entrypoint, such as@astrojs/cloudflare -
#17313
e2e319dThanks @ronits2407! - Exposes theAstroRuntimeLoggerinterface to allow users to properly type the logger functions at runtime. -
#17328
025cc74Thanks @matthewp! - Fixesastro dev --forcenot replacing an already-running dev server -
#17353
2bba277Thanks @ematipico! - Updates the Astro compiler to the latest version, which fixes many regressions. Refer to the changelog for more details. -
#17344
79a41e0Thanks @adamchal! - Improves rendering performance for pages with many component instances, such as repeated MDX<Content />components. -
Updated dependencies [
64b0d66]:- @astrojs/[email protected]
-
#17318
23a4120Thanks @astrobot-houston! - Fixes CSS module scoped-name hash mismatch inastro devwhen usingvite.css.transformer: 'lightningcss'with content collections. Previously, a component importing a CSS module and rendered via content collectionrender()would get different class name hashes in the element and the injected<style>tag, causing styles not to apply. -
#17323
4298883Thanks @ematipico! - Fixes a dev server memory leak which caused Node.js to emit warnings in the console. -
#17323
4298883Thanks @ematipico! - Fixes a dev server crash when a.htmlor/index.htmlsuffixed request (such as thosenetlify devprobes as pretty-URL fallbacks) matched a dynamic endpoint route, causing aTypeError: Missing parametererror -
#17325
cebc404Thanks @astrobot-houston! - Fixes a bug where CSS@importrules could end up mid-stylesheet after inline CSS chunks were merged during build, causing browsers to silently ignore them -
#17323
4298883Thanks @ematipico! - Fixes a build regression that could leave unresolved preload markers in inlined scripts with external dynamic imports -
Updated dependencies [
4298883,4298883]:- @astrojs/[email protected]
-
#17261
79aa99cThanks @astrobot-houston! - Fixes a false deprecation warning formarkdown.gfmandmarkdown.smartypantswhen using the Container API -
#17247
f94280dThanks @chatman-media! - Fixes route generation throwing "Missing parameter" (or silently dropping the segment) when a dynamic param's value is0. The generator used truthy checks instead of checking forundefined, sopaginate(posts, { params: { categoryId: 0 } })would crash even though0is a perfectly valid param value. -
#17278
6f11739Thanks @astrobot-houston! - Fixes missing CSS for virtual style modules (e.g., responsive image layout styles) in dev mode when JavaScript is disabled -
#17250
0b30b35Thanks @matthewp! - Fixes thesecurity.checkOrigincheck so it is applied consistently to Astro Actions and on-demand endpoints, regardless of how the request pipeline is composed. Previously, the origin check could be skipped in the composableastro/honopipeline depending on the order of themiddleware()primitive (or when it was omitted). -
#17274
8c3579bThanks @astrobot-houston! - Fixes missingrender()type overload for live collection entries. Previously, callingrender()on aLiveDataEntryproduced a TypeScript error when using onlylive.config.tswithout acontent.config.ts. -
#17257
4208297Thanks @astrobot-houston! - Fixesastro checkfailing to find@astrojs/checkandtypescriptwhen astro is installed in a directory outside the project tree (e.g. pnpm virtual store) -
#17272
b428648Thanks @matthewp! - Fixes island component paths so that extensionless imports (e.g.import { Counter } from '../components/Counter') resolve to the real file on disk, matching Vite's extension order and directoryindexresolution. This makes theinclude/excludeoptions of JSX renderer integrations (React, Preact, Solid) match components imported without a file extension, and removes the spurious React 19 "Invalid hook call" warning logged on every request in dev whenincludewas set alongside another JSX renderer -
#17279
2aeaa44Thanks @astrobot-houston! - Fixes a bug where<Picture inferSize>with a remote image could fail withFailedToFetchRemoteImageDimensionswhen the image server rate-limits requests (e.g. HTTP 429). Remote dimensions are now resolved once per render instead of once per output format. -
#17251
5240e26Thanks @matthewp! - Hardens the handling of attribute rendering when using with custom elements. -
#17248
429bd62Thanks @astrobot-houston! - Fixes a crash when using Astro'sgetViteConfigwith Vitest browser mode (e.g., Storybook vitest runner). Astro now skips dev server setup inside Vitest, preventing errors. -
#17260
14524c0Thanks @matthewp! - Fixes a regression where a<script>inside a component rendered throughAstro.slots.render()was hoisted out of its original position instead of staying next to its component content -
Updated dependencies [
eb6f97e]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#17242
9c05ba4Thanks @matthewp! - Fixes an error that could occur after the dev server restarts when using an adapter such as@astrojs/cloudflare, where a request would fail with a500referencing a missing pre-bundled dependency:The file does not exist at "node_modules/.vite/deps_ssr/astro_compiler-runtime.js?v=6419660d" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. -
#17202
c6d254dThanks @matthewp! - Refactors path alias resolution to use Vite's nativetsconfigPathsoptionThis is an internal change with no expected impact on user projects. Astro now defers tsconfig and jsconfig
pathsalias resolution to Vite, keeping a small fallback for a few CSS cases Vite does not yet handle. -
#17123
72e29bdThanks @martrapp! - Fixes an issue where the ClientRouter wipes head elements after page transitions if the<head>contains aserver:defercomponent. -
#17232
257505eThanks @matthewp! - Fixes a bug where<style>tags from components such as a content collection'sContentcould be silently dropped from the output when anawaitappeared before the component in an.astrofile's markup. -
#17193
a7352fdThanks @jan-kubica! - Fixes the background dev server failing to start whenastrois hoisted outside the project'snode_modules(for example bun workspaces). The background process is now spawned from Astro's own resolved location instead of a path assumed under the project root. -
#17255
581d171Thanks @astrobot-houston! - Fixes prefetch not working for links insideserver:defercomponents
-
#17212
7ba0bb1Thanks @matthewp! - Ensures transition directive values are HTML-escaped when rendered on hydrated islands -
#17224
dc5e52fThanks @astrobot-houston! - Fixes trailing slash handling for dynamic file endpoints in dev mode. Dynamic file endpoints (e.g.,src/pages/api/[name].json.ts) withtrailingSlash: "always"incorrectly required a trailing slash in dev mode, returning 404 for/api/bar.jsonand 200 for/api/bar.json/. -
#17067
23f9446Thanks @fkatsuhiro! - Fixed a bug where the development toolbar did not output a warning even though the implicit ARIA role and the manually specified role were duplicated. -
#17234
d5fbee8Thanks @ocavue! - Adds support forsharpv0.35. pnpm users no longer need to approvesharp's build script (seeallowBuilds) when on v0.35. -
#17223
5970ef4Thanks @astrobot-houston! - FixesgetCollection()returning empty in dev mode for large content collections (500k+ entries) -
#17184
799e5cdThanks @Princesseuh! - Upgrades the Rust compiler to the latest, which fixes some bugs. Refer to its changelog for more information. -
#17208
da8b573Thanks @matthewp! - Hardens forwarded header handling so the internal request helper validatesX-Forwarded-Hostagainstsecurity.allowedDomainsbefore trustingX-Forwarded-ForforclientAddress. Previously it only checked that the header was present, which was inconsistent with the publiccreateRequesthelper. This aligns both code paths; behavior is unchanged for correctly configured proxies.
-
#17189
24d2c9eThanks @astrobot-houston! - Fixes a bug where an error thrown inside one route'sgetStaticPaths()would prevent other valid routes from being matched in dev mode -
#16932
8f4a3dbThanks @fkatsuhiro! - Fixes HMR for action files during development. Editing files insrc/actions/now takes effect on the next request without requiring a dev server restart. -
#17087
fb0ab02Thanks @jp-knj! - Fixes localized custom error pages in i18n projects so routes like/pt/404are used for missing localized pages and return the correct status code
- Updated dependencies [
3b5e994]:- @astrojs/[email protected]
-
#17151
ccceda3Thanks @matthewp! - Fixesastro devincorrectly starting in background mode for Warp terminal users. Hybrid environments like Warp are no longer treated as AI agents for auto-background detection. -
#17158
164df87Thanks @ematipico! - Fixesastro dev --background --hostnot listing the network addresses. The background server start output andastro dev statusnow show every exposed network URL, matching the foreground dev server. -
#17141
d785b9dThanks @astrobot-houston! - Fixes responsive image CSS overriding user styles defined inside CSS@layerblocks. The generated image styles are now wrapped in@layer astro.images, ensuring they have lower cascade priority than user-defined layers. -
#17150
1a61386Thanks @matthewp! - Fixesastro dev --backgroundfailing on Windows with "Failed to spawn background dev server process"
-
#16965
57ead0dThanks @Princesseuh! - Makes'jsx'the default value forcompressHTMLAstro now strips whitespace from your HTML using JSX rules by default, the same way frameworks like React do. Whitespace and line breaks around elements are removed, but meaningful whitespace within a single line — like a space between two inline elements — is preserved. To keep a space that would otherwise be removed, write it explicitly in your source, for example with
{" "}.This can change rendered output where whitespace between inline elements was previously meaningful. To keep Astro's earlier behavior, set
compressHTML: truefor HTML-aware compression, orcompressHTML: falseto preserve all whitespace. -
#16610
c63e7e4Thanks @matthewp! - Adds background dev server management for AI coding agents.When an AI coding agent is detected,
astro devnow automatically starts the dev server as a detached background process. This prevents the dev server from blocking the agent's terminal and allows it to continue working while the server runs.A lock file (
.astro/dev.json) is written when the dev server starts, recording the server's URL, port, and PID. This prevents duplicate servers from being started for the same project.astro dev --background— Start the dev server as a background process (this is what runs automatically when an agent is detected).astro dev stop— Stop a running background dev server.astro dev status— Check if a dev server is running and display its URL, PID, and uptime.astro dev logs— View logs from a background dev server. Use--follow(-f) to stream new output as it's written.
These allow you to start and manage dev servers programmatically and were designed with AI coding agents in mind.
No action is required. If you are not using an AI coding agent,
astro devbehaves exactly as before. If you are using an agent, background mode is enabled automatically — the agent will receive the server URL and PID, and can useastro dev stopto shut it down.To opt out of automatic background mode when an agent is detected, set the environment variable
ASTRO_DEV_BACKGROUND=0before runningastro dev. -
#17010
0606073Thanks @ocavue! - Removes the@astrojs/dbpackage as it is no longer maintained.The
@astrojs/dbpackage were deprecated in v6.4.5 and is now removed. This means theastro db,astro login,astro logout,astro link, andastro initCLI commands have also been removed.If you were using Astro DB in your project, remove
@astrojs/dbfrom your project's dependencies and replace it with one of the following alternatives:- Node.js built-in SQLite: Node.js now includes a built-in
node:sqlitemodule (available since Node.js v22.5.0). This is a good option if you are using the Node.js adapter and were using@astrojs/dbfor local SQLite storage. - Drizzle ORM: If you were using
@astrojs/dbfor its Drizzle-based schema and query API, you can use Drizzle directly with any supported database. - Other database libraries: Use any database library that suits your deployment platform (e.g. Turso, PlanetScale, Neon).
- Node.js built-in SQLite: Node.js now includes a built-in
-
#16462
c30a778Thanks @Princesseuh! - Replaces the Go compiler with a Rust-based version.The Rust-based Astro compiler (
@astrojs/compiler-rs) is now the default compiler. This new compiler is faster and more reliable, leading to faster build times and iteration cycles during development.This new compiler is more strict regarding invalid syntax. For example, unclosed HTML tags will now throw an error instead of being ignored. It also does not attempt to correct semantically invalid HTML anymore, instead leaving it to the browser to handle, similar to other tools or
document.write()in JavaScript.The previous Go-based compiler has been removed, along with the
experimental.rustCompilerflag used to opt into the Rust compiler. If you were settingexperimental.rustCompilerin yourastro.config.mjs, you can now remove it. No other action is required. -
#16966
6650ec2Thanks @Princesseuh! - Makes Sätteri the default Markdown processorAstro now renders
.mdfiles withsatteri()from@astrojs/markdown-satteri, its native Markdown pipeline, instead of the remark/rehype pipeline.@astrojs/markdown-remarkis no longer installed by default.To keep using the remark/rehype pipeline, install
@astrojs/markdown-remarkand set it as your processor:// astro.config.mjs import { defineConfig } from 'astro/config'; import { unified } from '@astrojs/markdown-remark'; export default defineConfig({ markdown: { processor: unified(), }, });
The deprecated
markdown.remarkPlugins,markdown.rehypePlugins, andmarkdown.remarkRehypeoptions still work, but now require@astrojs/markdown-remarkto be used. -
#16877
3b7d76eThanks @matthewp! - Enables advanced routing by default.The advanced routing feature introduced behind a flag in v6.3.0 is no longer experimental and is now enabled by default.
This gives full control over how requests flow through your application, with first-class support for frameworks like Hono.
Advanced routing now uses
src/fetch.tsas default entrypoint instead ofsrc/app.ts.If you were previously using this feature without a custom entrypoint, please configure
fetchFileor rename your entrypoint tosrc/fetch.ts, and then remove the experimental flag from your Astro config:import { defineConfig } from 'astro/config'; export default defineConfig({ experimental { - advancedRouting: true, }, + fetchFile: 'app.ts' // optional, you only need this if you cannot rename your entrypoint. });fetchFileis now a top-level config option instead of being nested underexperimental.advancedRouting. If you were using a custom entrypoint, please update your Astro config to move its configuration:// astro.config.mjs export default defineConfig({ - experimental: { - advancedRouting: { - fetchFile: 'my-custom-entrypoint.ts', - }, - }, + fetchFile: 'my-custom-entrypoint.ts', })You can also set
fetchFile: nullto disable the entrypoint if you are usingsrc/fetch.tsfor another purpose, or don’t need advanced routing features.If you have been waiting for stabilization before using advanced routing, you can now do so.
Please see the advanced routing guide in docs for more about this feature.
-
#16725
10229f7Thanks @ArmandPhilippot! - Removes deprecated APIs exported fromastro:transitions.In Astro 6.x, some helpers available in
astro:transitionsandastro:transitions/clientwere deprecated.In Astro 7.0, the following APIs can no longer be used in your project:
TRANSITION_BEFORE_PREPARATIONTRANSITION_AFTER_PREPARATIONTRANSITION_BEFORE_SWAPTRANSITION_AFTER_SWAPTRANSITION_PAGE_LOADisTransitionBeforePreparationEvent()isTransitionBeforeSwapEvent()createAnimationScope()
Remove any occurrence of
createAnimationScope():-import { createAnimationScope } from 'astro:transitions';Replace any occurrence of the other APIs using the lifecycle event names directly:
-import { - TRANSITION_AFTER_SWAP, - isTransitionBeforePreparationEvent, -} from 'astro:transitions/client'; -console.log(isTransitionBeforePreparationEvent(event)); +console.log(event.type === 'astro:before-preparation'); -console.log(TRANSITION_AFTER_SWAP); +console.log('astro:after-swap');
Learn more about all utilities available in the View Transitions Router API Reference.
-
#16998
57dcc31Thanks @matthewp! - ExposesgetFetchState()fromastro/honoas a public APIThe
getFetchState()function retrieves or lazily creates aFetchStatefrom a Hono context object. This allows third-party packages to build Hono middleware that interacts with Astro's per-request state, giving theastro/honoAPI the same extensibility asastro/fetch.import { Hono } from 'hono'; import { getFetchState, pages } from 'astro/hono'; const app = new Hono(); app.use(async (context, next) => { const state = getFetchState(context); state.locals.message = 'Hello from custom middleware'; await next(); }); app.use(pages()); export default app;
-
#16996
300641eThanks @florian-lefebvre! - Adds asubsetfield to theFontDatatype exposed viafontDatafromastro:assets. When using multiple font subsets (e.g.,subsets: ["latin", "korean"]), each font data entry now includes the subset name, making it possible to distinguish between font entries for different subsets that share the same weight and style. -
#16745
f864a80Thanks @ematipico! - The custom logger feature introduced behind a flag in v6.2.0 is no longer experimental and is available for general use.This feature provides better control over Astro's logging infrastructure by allowing you to replace the default console output with custom logging implementations (e.g., structured JSON). This is particularly useful for on-demand rendering when connecting to log aggregation services such as Kibana, Logstash, CloudWatch, Grafana, or Loki.
Astro provides three built-in log handlers (
json,node, andconsole), and you can also create your own.import { defineConfig, logHandlers } from 'astro/config'; export default defineConfig({ logger: logHandlers.json({ pretty: true, level: 'warn', }), });
import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { entrypoint: '@org/custom-logger', }, });
Additionally,
context.loggeris now always available in API routes and middleware, even without a custom logger configured.If you were previously using this feature, please remove the experimental flag from your Astro config:
import { defineConfig } from 'astro/config'; export default defineConfig({ - experimental: { - logger: { - entrypoint: '@org/custom-logger', - }, - }, + logger: { + entrypoint: '@org/custom-logger', + }, });If you have been waiting for stabilization before using custom loggers, you can now do so.
Please see the Logger docs for more about this feature.
-
#16981
0d6d644Thanks @ematipico! - Removes the settingexperimental.queuedRendering. The new rendering engine is now stable and replaces the old one.As part of the stabilization, the queued rendering has been improved, and some features have been removed:
- The construction of the queue has been removed, instead now Astro uses a streaming approach where components are rendered and flushed as they are encountered.
- The node polling feature has been removed because it doesn't yield concrete savings.
- The content cache has been descoped, and how only tag names are cached. If you were previously using this experimental feature, you must remove this experimental flag from your configuration as it no longer exists:
// astro.config.mjs import { defineConfig } from "astro/config"; export default defineConfig({ experimental: { - queuedRendering: {} } }); -
#17116
f95e58eThanks @ascorbic! - Stabilizes route caching, removing theexperimental.cacheandexperimental.routeRulesflags and replacing them with the top-levelcacheandrouteRulesconfiguration options.Route caching, introduced experimentally in v6.0.0, is now stable. It gives you a platform-agnostic way to cache responses from on-demand rendered pages and endpoints, based on standard HTTP caching semantics.
Update your config to move
cacheandrouteRulesout of theexperimentalblock:// astro.config.mjs import { defineConfig, memoryCache } from 'astro/config'; export default defineConfig({ - experimental: { - cache: { - provider: memoryCache(), - }, - routeRules: { - '/blog/[...path]': { maxAge: 300, swr: 60 }, - }, - }, + cache: { + provider: memoryCache(), + }, + routeRules: { + '/blog/[...path]': { maxAge: 300, swr: 60 }, + }, });Set caching directives in your routes with
Astro.cache(in.astropages) orcontext.cache(in API routes and middleware), and Astro translates them into the appropriate headers or runtime behavior depending on your configured cache provider. You can also define cache rules for routes declaratively in your config usingrouteRules, without modifying route code.See the route caching guide for more information.
-
#16980
1f07343Thanks @matthewp! - Removesstate.provide(),state.resolve(),state.finalizeAll(), andApp.Providersfrom the public advanced routing API. These context provider extension points are now internal-only. If you were using them in an integration, uselocalsto share per-request state instead. -
#17111
c0f33edThanks @ematipico! - Harden the limits on the number of decoding on the URL. -
#16982
1e000e2Thanks @matthewp! - Improves the warning when accessingAstro.sessionwithout session storage configured. Thesessionproperty is now always defined on the context object, and accessing it without configuration logs a helpful message instead of silently returningundefined. -
#16335
9a53f77Thanks @ascorbic! - Adds shared helper utilities for CDN cache provider authors for route cachingExports
astro/cache/provider-utilswith helpers for building platform-specific cache-control headers, generating path-based invalidation tags, and normalizing invalidation options. These are used internally by the first-party Netlify, Vercel, and Cloudflare cache providers. -
#17095
e84ebc0Thanks @matthewp! - Improves build performance by removing an unfiltered transform hook from theastro:head-metadata-buildplugin. Head propagation modules are now identified by their module ID (?astroPropagatedAssets) instead of scanning every module's source code. -
#17041
4c4a91cThanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchpages()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when a page threw during render. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. -
#17097
5e340d7Thanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchmiddleware()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when middleware threw. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. Errors surfaced throughnext(the host framework's downstream chain) still propagate to the host's own error handler. -
#15819
cafec4eThanks @delucis! - Fixes--portflag being ignored after a Vite-triggered server restart (e.g. when a.envfile changes) -
#17104
b074a37Thanks @iseraph-dev! - Fixes the custom500.astropage receiving an emptyerrorprop when the error originated in middleware. -
#17078
04547ecThanks @astrobot-houston! - Fixes a spuriousAstro.request.headerswarning on prerendered pages whensecurity.allowedDomainsis configured. The internalallowedDomainsheader validation now skips prerendered routes, since they use synthetic requests with no real headers. -
#16603
deaaf3fThanks @alexanderniebuhr! - Removes the warning that Astro does not support vite v8, since Astro v7 does support vite v8 -
#16335
9a53f77Thanks @ascorbic! - Passes theRequestobject toCacheProvider.setHeaders()for route cachingCache providers now receive the incoming
Requestas a second argument tosetHeaders(options, request). This allows CDN providers to read the request URL, headers, and other properties when generating cache response headers, for example to auto-tag responses with their pathname for path-based invalidation. -
#17098
637a1b6Thanks @matthewp! - Fixes internal Astro headers leaking from directpages()handler responses -
#17090
3cf76c0Thanks @matthewp! - Fixes Vite and Rolldown build warnings -
#16434
ee079d4Thanks @ematipico! - Fixes an issue where i18n domains would return 404 whentrailingSlashis set tonever. -
Updated dependencies [
7e7ab87,ff7b718,241250b]:- @astrojs/[email protected]
-
#17116
f95e58eThanks @ascorbic! - Stabilizes route caching, removing theexperimental.cacheandexperimental.routeRulesflags and replacing them with the top-levelcacheandrouteRulesconfiguration options.Route caching, introduced experimentally in v6.0.0, is now stable. It gives you a platform-agnostic way to cache responses from on-demand rendered pages and endpoints, based on standard HTTP caching semantics.
Update your config to move
cacheandrouteRulesout of theexperimentalblock:// astro.config.mjs import { defineConfig, memoryCache } from 'astro/config'; export default defineConfig({ - experimental: { - cache: { - provider: memoryCache(), - }, - routeRules: { - '/blog/[...path]': { maxAge: 300, swr: 60 }, - }, - }, + cache: { + provider: memoryCache(), + }, + routeRules: { + '/blog/[...path]': { maxAge: 300, swr: 60 }, + }, });Set caching directives in your routes with
Astro.cache(in.astropages) orcontext.cache(in API routes and middleware), and Astro translates them into the appropriate headers or runtime behavior depending on your configured cache provider. You can also define cache rules for routes declaratively in your config usingrouteRules, without modifying route code.See the route caching guide for more information.
-
#17090
3cf76c0Thanks @matthewp! - Fixes Vite and Rolldown build warnings -
Updated dependencies [
7e7ab87]:- @astrojs/[email protected]
-
#16965
57ead0dThanks @Princesseuh! - Makes'jsx'the default value forcompressHTMLAstro now strips whitespace from your HTML using JSX rules by default, the same way frameworks like React do. Whitespace and line breaks around elements are removed, but meaningful whitespace within a single line — like a space between two inline elements — is preserved. To keep a space that would otherwise be removed, write it explicitly in your source, for example with
{" "}.This can change rendered output where whitespace between inline elements was previously meaningful. To keep Astro's earlier behavior, set
compressHTML: truefor HTML-aware compression, orcompressHTML: falseto preserve all whitespace.
-
#17111
c0f33edThanks @ematipico! - Harden the limits on the number of decoding on the URL. -
#17095
e84ebc0Thanks @matthewp! - Improves build performance by removing an unfiltered transform hook from theastro:head-metadata-buildplugin. Head propagation modules are now identified by their module ID (?astroPropagatedAssets) instead of scanning every module's source code. -
#17041
4c4a91cThanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchpages()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when a page threw during render. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. -
#17097
5e340d7Thanks @iseraph-dev! - Fixes a bug where the advanced routingastro/hono/astro/fetchmiddleware()handler returned the host framework's defaultInternal Server Errorresponse instead of rendering the custom500.astropage when middleware threw. Unmatched requests with a prerendered (or absent) custom 404 page now render the 404 error page instead of failing the same way. Errors surfaced throughnext(the host framework's downstream chain) still propagate to the host's own error handler. -
#17104
b074a37Thanks @iseraph-dev! - Fixes the custom500.astropage receiving an emptyerrorprop when the error originated in middleware. -
#17098
637a1b6Thanks @matthewp! - Fixes internal Astro headers leaking from directpages()handler responses
-
#16966
6650ec2Thanks @Princesseuh! - Makes Sätteri the default Markdown processorAstro now renders
.mdfiles withsatteri()from@astrojs/markdown-satteri, its native Markdown pipeline, instead of the remark/rehype pipeline.@astrojs/markdown-remarkis no longer installed by default.To keep using the remark/rehype pipeline, install
@astrojs/markdown-remarkand set it as your processor:// astro.config.mjs import { defineConfig } from 'astro/config'; import { unified } from '@astrojs/markdown-remark'; export default defineConfig({ markdown: { processor: unified(), }, });
The deprecated
markdown.remarkPlugins,markdown.rehypePlugins, andmarkdown.remarkRehypeoptions still work, but now require@astrojs/markdown-remarkto be used.
- #17078
04547ecThanks @astrobot-houston! - Fixes a spuriousAstro.request.headerswarning on prerendered pages whensecurity.allowedDomainsis configured. The internalallowedDomainsheader validation now skips prerendered routes, since they use synthetic requests with no real headers.
-
#17010
0606073Thanks @ocavue! - Removes theastro db,astro login,astro logout,astro link, andastro initCLI commands.The
@astrojs/dbpackage is now deprecated. We recommend using a database client (Drizzle, Kysely, etc.) directly instead. -
#16877
3b7d76eThanks @matthewp! - Enables advanced routing by default.The advanced routing feature introduced behind a flag in v6.3.0 is no longer experimental and is now enabled by default.
This gives full control over how requests flow through your application, with first-class support for frameworks like Hono.
Advanced routing now uses
src/fetch.tsas default entrypoint instead ofsrc/app.ts.If you were previously using this feature without a custom entrypoint, please configure
fetchFileor rename your entrypoint tosrc/fetch.ts, and then remove the experimental flag from your Astro config:import { defineConfig } from 'astro/config'; export default defineConfig({ experimental { - advancedRouting: true, }, + fetchFile: 'app.ts' // optional, you only need this if you cannot rename your entrypoint. });fetchFileis now a top-level config option instead of being nested underexperimental.advancedRouting. If you were using a custom entrypoint, please update your Astro config to move its configuration:// astro.config.mjs export default defineConfig({ - experimental: { - advancedRouting: { - fetchFile: 'my-custom-entrypoint.ts', - }, - }, + fetchFile: 'my-custom-entrypoint.ts', })You can also set
fetchFile: nullto disable the entrypoint if you are usingsrc/fetch.tsfor another purpose, or don’t need advanced routing features.If you have been waiting for stabilization before using advanced routing, you can now do so.
Please see the advanced routing guide in docs for more about this feature.
-
#16998
57dcc31Thanks @matthewp! - ExposesgetFetchState()fromastro/honoas a public APIThe
getFetchState()function retrieves or lazily creates aFetchStatefrom a Hono context object. This allows third-party packages to build Hono middleware that interacts with Astro's per-request state, giving theastro/honoAPI the same extensibility asastro/fetch.import { Hono } from 'hono'; import { getFetchState, pages } from 'astro/hono'; const app = new Hono(); app.use(async (context, next) => { const state = getFetchState(context); state.locals.message = 'Hello from custom middleware'; await next(); }); app.use(pages()); export default app;
-
#16996
300641eThanks @florian-lefebvre! - Adds asubsetfield to theFontDatatype exposed viafontDatafromastro:assets. When using multiple font subsets (e.g.,subsets: ["latin", "korean"]), each font data entry now includes the subset name, making it possible to distinguish between font entries for different subsets that share the same weight and style. -
#16745
f864a80Thanks @ematipico! - The custom logger feature introduced behind a flag in v6.2.0 is no longer experimental and is available for general use.This feature provides better control over Astro's logging infrastructure by allowing you to replace the default console output with custom logging implementations (e.g., structured JSON). This is particularly useful for on-demand rendering when connecting to log aggregation services such as Kibana, Logstash, CloudWatch, Grafana, or Loki.
Astro provides three built-in log handlers (
json,node, andconsole), and you can also create your own.import { defineConfig, logHandlers } from 'astro/config'; export default defineConfig({ logger: logHandlers.json({ pretty: true, level: 'warn', }), });
import { defineConfig } from 'astro/config'; export default defineConfig({ logger: { entrypoint: '@org/custom-logger', }, });
Additionally,
context.loggeris now always available in API routes and middleware, even without a custom logger configured.If you were previously using this feature, please remove the experimental flag from your Astro config:
import { defineConfig } from 'astro/config'; export default defineConfig({ - experimental: { - logger: { - entrypoint: '@org/custom-logger', - }, - }, + logger: { + entrypoint: '@org/custom-logger', + }, });If you have been waiting for stabilization before using custom loggers, you can now do so.
Please see the Logger docs for more about this feature.
-
#16981
0d6d644Thanks @ematipico! - Removes the settingexperimental.queuedRendering. The new rendering engine is now stable and replaces the old one.As part of the stabilization, the queued rendering has been improved, and some features have been removed:
- The construction of the queue has been removed, instead now Astro uses a streaming approach where components are rendered and flushed as they are encountered.
- The node polling feature has been removed because it doesn't yield concrete savings.
- The content cache has been descoped, and how only tag names are cached. If you were previously using this experimental feature, you must remove this experimental flag from your configuration as it no longer exists:
// astro.config.mjs import { defineConfig } from "astro/config"; export default defineConfig({ experimental: { - queuedRendering: {} } });
-
#16610
c63e7e4Thanks @matthewp! - Adds background dev server management for AI coding agents.When an AI coding agent is detected,
astro devnow automatically starts the dev server as a detached background process. This prevents the dev server from blocking the agent's terminal and allows it to continue working while the server runs.A lock file (
.astro/dev.json) is written when the dev server starts, recording the server's URL, port, and PID. This prevents duplicate servers from being started for the same project.astro dev --background— Start the dev server as a background process (this is what runs automatically when an agent is detected).astro dev stop— Stop a running background dev server.astro dev status— Check if a dev server is running and display its URL, PID, and uptime.astro dev logs— View logs from a background dev server. Use--follow(-f) to stream new output as it's written.
These allow you to start and manage dev servers programmatically and were designed with AI coding agents in mind.
No action is required. If you are not using an AI coding agent,
astro devbehaves exactly as before. If you are using an agent, background mode is enabled automatically — the agent will receive the server URL and PID, and can useastro dev stopto shut it down.To opt out of automatic background mode when an agent is detected, set the environment variable
ASTRO_DEV_BACKGROUND=0before runningastro dev. -
#16725
10229f7Thanks @ArmandPhilippot! - Removes deprecated APIs exported fromastro:transitions.In Astro 6.x, some helpers available in
astro:transitionsandastro:transitions/clientwere deprecated.In Astro 7.0, the following APIs can no longer be used in your project:
TRANSITION_BEFORE_PREPARATIONTRANSITION_AFTER_PREPARATIONTRANSITION_BEFORE_SWAPTRANSITION_AFTER_SWAPTRANSITION_PAGE_LOADisTransitionBeforePreparationEvent()isTransitionBeforeSwapEvent()createAnimationScope()
Remove any occurrence of
createAnimationScope():-import { createAnimationScope } from 'astro:transitions';Replace any occurrence of the other APIs using the lifecycle event names directly:
-import { - TRANSITION_AFTER_SWAP, - isTransitionBeforePreparationEvent, -} from 'astro:transitions/client'; -console.log(isTransitionBeforePreparationEvent(event)); +console.log(event.type === 'astro:before-preparation'); -console.log(TRANSITION_AFTER_SWAP); +console.log('astro:after-swap');
Learn more about all utilities available in the View Transitions Router API Reference.
-
#16980
1f07343Thanks @matthewp! - Removesstate.provide(),state.resolve(),state.finalizeAll(), andApp.Providersfrom the public advanced routing API. These context provider extension points are now internal-only. If you were using them in an integration, uselocalsto share per-request state instead. -
#16982
1e000e2Thanks @matthewp! - Improves the warning when accessingAstro.sessionwithout session storage configured. Thesessionproperty is now always defined on the context object, and accessing it without configuration logs a helpful message instead of silently returningundefined. -
#16990
ebeb830Thanks @ocavue! - FixesAstro.request.urlnot reflecting validatedX-Forwarded-Proto/X-Forwarded-Hostheaders whensecurity.allowedDomainsis configured. Previously, onlyAstro.urlwas updated with the forwarded origin whileAstro.request.urlretained the socket-derived URL, causing the two to diverge behind TLS-terminating proxies.
- #16603
deaaf3fThanks @alexanderniebuhr! - Removes the warning that Astro does not support vite v8, since Astro v7 does support vite v8
-
#16462
c30a778Thanks @Princesseuh! - Replaces the Go compiler with a Rust-based version.The Rust-based Astro compiler (
@astrojs/compiler-rs) is now the default compiler. This new compiler is faster and more reliable, leading to faster build times and iteration cycles during development.This new compiler is more strict regarding invalid syntax. For example, unclosed HTML tags will now throw an error instead of being ignored. It also does not attempt to correct semantically invalid HTML anymore, instead leaving it to the browser to handle, similar to other tools or
document.write()in JavaScript.The previous Go-based compiler has been removed, along with the
experimental.rustCompilerflag used to opt into the Rust compiler. If you were settingexperimental.rustCompilerin yourastro.config.mjs, you can now remove it. No other action is required.