github withastro/astro astro@6.0.0-beta.0

latest releases: @astrojs/react@5.0.0-beta.1, @astrojs/language-server@2.16.1-beta.1, create-astro@5.0.0-beta.1...
pre-release7 hours ago

Patch Changes

  • #15125 6feb0d7 Thanks @florian-lefebvre! - Improves JSDoc annotations for AstroGlobal, AstroSharedContext and APIContext types

  • #15176 9265546 Thanks @matthewp! - Fixes hydration for framework components inside MDX when using Astro.slots.render()

    Previously, when multiple framework components with client:* directives were passed as named slots to an Astro component in MDX, only the first slot would hydrate correctly. Subsequent slots would render their HTML but fail to include the necessary hydration scripts.

  • #15125 6feb0d7 Thanks @florian-lefebvre! - Fixes remote images Etag header handling by disabling internal cache

  • #15121 06261e0 Thanks @ematipico! - Fixes a bug where the Astro, with the Cloudlfare integration, couldn't correctly serve certain routes in the development server.

  • #15125 6feb0d7 Thanks @florian-lefebvre! - Fixes images not working in development when using setups with port forwarding

  • #15137 2f70bf1 Thanks @matthewp! - Adds legacy.collectionsBackwardsCompat flag that restores v5 backwards compatibility behavior for legacy content collections - (v6 upgrade guidance)

    When enabled, this flag allows:

    • Collections defined without loaders (automatically get glob loader)
    • Collections with type: 'content' or type: 'data'
    • Config files located at src/content/config.ts (legacy location)
    • Legacy entry API: entry.slug and entry.render() methods
    • Path-based entry IDs instead of slug-based IDs
    // astro.config.mjs
    export default defineConfig({
      legacy: {
        collectionsBackwardsCompat: true,
      },
    });

    This is a temporary migration helper for v6 upgrades. Migrate collections to the Content Layer API, then disable this flag.

  • #15125 6feb0d7 Thanks @florian-lefebvre! - Reduces Astro’s install size by around 8 MB

  • #15125 6feb0d7 Thanks @florian-lefebvre! - Enables the ClientRouter to preserve the original hash part of the target URL during server side redirects.

  • #15125 6feb0d7 Thanks @florian-lefebvre! - BREAKING CHANGE to the experimental Fonts API only

    Changes the font format downloaded by default when using the experimental Fonts API. Additionally, adds a new formats configuration option to specify which font formats to download.

    Previously, Astro was opinionated about which font sources would be kept for usage, mainly keeping woff2 and woff files.

    You can now specify what font formats should be downloaded (if available). Only woff2 files are downloaded by default.

    What should I do?

    If you were previously relying on Astro downloading the woff format, you will now need to specify this explicitly with the new formats configuration option. Additionally, you may also specify any additional file formats to download if available:

    // astro.config.mjs
    import { defineConfig, fontProviders } from 'astro/config'
    
    export default defineConfig({
        experimental: {
            fonts: [{
                name: 'Roboto',
                cssVariable: '--font-roboto',
                provider: fontProviders.google(),
    +            formats: ['woff2', 'woff', 'otf']
            }]
        }
    })
  • #15179 8c8aee6 Thanks @HiDeoo! - Fixes an issue when importing using an import alias a file with a name matching a directory name.

  • #15176 9265546 Thanks @matthewp! - Fixes scripts in components not rendering when a sibling <Fragment slot="..."> exists but is unused

Don't miss a new astro release

NewReleases is sending notifications on new releases.