github withastro/astro astro@6.0.0-beta.15

latest releases: @astrojs/cloudflare@13.0.0-beta.9, @astrojs/node@10.0.0-beta.5, @astrojs/rss@4.0.15-beta.4...
pre-release7 hours ago

Minor Changes

  • #15471 32b4302 Thanks @ematipico! - Adds a new experimental flag queuedRendering to enable a queue-based rendering engine

    The 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.enabled set to true, 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 contentCache option. 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 d43841d Thanks @Princesseuh! - Adds a new experimental.rustCompiler flag to opt into the experimental Rust-based Astro compiler

    This 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-rs package 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 30cd6db Thanks @ematipico! - Fixes an issue where the use of the Astro internal logger couldn't work with Cloudflare Vite plugin.

  • #15562 e14a51d Thanks @florian-lefebvre! - Removes types for the astro:ssr-manifest module, which was removed

  • #15435 957b9fe Thanks @rururux! - Improves compatibility of the built-in image endpoint with runtimes that don't support CJS dependencies correctly

  • #15640 4c1a801 Thanks @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 f6473fd Thanks @ascorbic! - Improves .astro component 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 999a7dd Thanks @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-face declarations from the <Font> component were removed and re-inserted on every client-side navigation, causing the browser to re-evaluate them.

  • #15580 a92333c Thanks @ematipico! - Fixes a build error when generating projects with a large number of static routes

  • #15549 be1c87e Thanks @0xRozier! - Fixes an issue where original (unoptimized) images from prerendered pages could be kept in the build output during SSR builds.

  • #15565 30cd6db Thanks @ematipico! - Fixes an issue where the use of the Code component would result in an unexpected error.

  • #15585 98ea30c Thanks @matthewp! - Add a default body size limit for server actions to prevent oversized requests from exhausting memory.

  • #15565 30cd6db Thanks @ematipico! - Fixes an issue where the new Astro v6 development server didn't log anything when navigating the pages.

  • #15591 1ed07bf Thanks @renovate! - Upgrades devalue to v5.6.3

  • #15633 9d293c2 Thanks @jwoyo! - Fixes a case where <script> tags from components passed as slots to server islands were not included in the response

  • #15586 35bc814 Thanks @matthewp! - Fixes an issue where allowlists were not being enforced when handling remote images

Don't miss a new astro release

NewReleases is sending notifications on new releases.