Minor Changes
-
#15471
32b4302Thanks @ematipico! - Adds a new experimental flagqueuedRenderingto enable a queue-based rendering engineThe new engine is based on a two-pass process, where the first pass
traverses the tree of components, emits an ordered queue, and then the queue is rendered.The new engine does not use recursion, and comes with two customizable options.
Early benchmarks showed significant speed improvements and memory efficiency in big projects.
Queue-rendered based
The new engine can be enabled in your Astro config with
experimental.queuedRendering.enabledset totrue, and can be further customized with additional sub-features.// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, }, }, });
Pooling
With the new engine enabled, you now have the option to have a pool of nodes that can be saved and reused across page rendering. Node pooling has no effect when rendering pages on demand (SSR) because these rendering requests don't share memory. However, it can be very useful for performance when building static pages.
// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, poolSize: 2000, // store up to 2k nodes to be reused across renderers }, }, });
Content caching
The new engine additionally unlocks a new
contentCacheoption. This allows you to cache values of nodes during the rendering phase. This is currently a boolean feature with no further customization (e.g. size of cache) that uses sensible defaults for most large content collections:When disabled, the pool engine won't cache strings, but only types.
// astro.config.mjs export default defineConfig({ experimental: { queuedRendering: { enabled: true, contentCache: true, // enable re-use of node values }, }, });
For more information on enabling and using this feature in your project, see the experimental queued rendering docs for more details.
-
#15543
d43841dThanks @Princesseuh! - Adds a newexperimental.rustCompilerflag to opt into the experimental Rust-based Astro compilerThis experimental compiler is faster, provides better error messages, and generally has better support for modern JavaScript, TypeScript, and CSS features.
After enabling in your Astro config, the
@astrojs/compiler-rspackage must also be installed into your project separately:import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { rustCompiler: true, }, });
This new compiler is still in early development and may exhibit some differences compared to the existing Go-based compiler. Notably, this compiler is generally more strict in regard to invalid HTML syntax and may throw errors in cases where the Go-based compiler would have been more lenient. For example, unclosed tags (e.g.
<p>My paragraph) will now result in errors.For more information about using this experimental feature in your project, especially regarding expected differences and limitations, please see the experimental Rust compiler reference docs. To give feedback on the compiler, or to keep up with its development, see the RFC for a new compiler for Astro for more information and discussion.
Patch Changes
-
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin. -
#15562
e14a51dThanks @florian-lefebvre! - Removes types for theastro:ssr-manifestmodule, which was removed -
#15435
957b9feThanks @rururux! - Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly -
#15640
4c1a801Thanks @ematipico! - Reverts the support of Shiki with CSP. Unfortunately, after exhaustive tests, the highlighter can't be supported to cover all cases.Adds a warning when both Content Security Policy (CSP) and Shiki syntax highlighting are enabled, as they are incompatible due to Shiki's use of inline styles
-
#15605
f6473fdThanks @ascorbic! - Improves.astrocomponent SSR rendering performance by up to 2x.This includes several optimizations to the way that Astro generates and renders components on the server. These are mostly micro-optimizations, but they add up to a significant improvement in performance. Most pages will benefit, but pages with many components will see the biggest improvement, as will pages with lots of strings (e.g. text-heavy pages with lots of HTML elements).
-
#15514
999a7ddThanks @veeceey! - Fixes font flash (FOUT) during ClientRouter navigation by preserving inline<style>elements and font preload links in the head during page transitions.Previously,
@font-facedeclarations from the<Font>component were removed and re-inserted on every client-side navigation, causing the browser to re-evaluate them. -
#15580
a92333cThanks @ematipico! - Fixes a build error when generating projects with a large number of static routes -
#15549
be1c87eThanks @0xRozier! - Fixes an issue where original (unoptimized) images from prerendered pages could be kept in the build output during SSR builds. -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the use of theCodecomponent would result in an unexpected error. -
#15585
98ea30cThanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory. -
#15565
30cd6dbThanks @ematipico! - Fixes an issue where the new Astro v6 development server didn't log anything when navigating the pages. -
#15591
1ed07bfThanks @renovate! - Upgradesdevalueto v5.6.3 -
#15633
9d293c2Thanks @jwoyo! - Fixes a case where<script>tags from components passed as slots to server islands were not included in the response -
#15586
35bc814Thanks @matthewp! - Fixes an issue where allowlists were not being enforced when handling remote images