github withastro/astro astro@2.0.0-beta.2

latest releases: astro@5.0.0-beta.2, @astrojs/vue@5.0.0-beta.0, @astrojs/svelte@6.0.0-beta.0...
pre-release20 months ago

Major Changes

  • #5782 1f92d64ea Thanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0

  • #5753 302e0ef8f Thanks @bluwy! - Default preview host to localhost instead of 127.0.0.1. This allows the static server and integration preview servers to serve under ipv6.

  • #5842 c4b0cb8bf Thanks @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.

    You can control this location with the new build configuration option named assets.

  • #5825 52209ca2a Thanks @bholmesdev! - Baseline the experimental contentCollections flag. You're free to remove this from your astro config!

    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
    - experimental: { contentCollections: true }
    })

Minor Changes

  • #5786 c2180746b Thanks @bholmesdev! - Move generated content collection types to a .astro directory. This replaces the previously generated src/content/types.generated.d.ts file.

    If you're using Git for version control, we recommend ignoring this generated directory by adding .astro to your .gitignore.

    Astro will also generate the TypeScript reference path to include .astro types in your project. This will update your project's src/env.d.ts file, or write one if none exists.

  • #5826 840412128 Thanks @bholmesdev! - Allow Zod objects, unions, discriminated unions, intersections, and transform results as content collection schemas.

    Migration

    Astro requires a z.object(...) wrapper on all content collection schemas. Update your content collections config like so:

    // src/content/config.ts
    import { z, defineCollection } from 'astro:content';
    
    const blog = defineCollection({
    - schema: {
    + schema: z.object({
      ...
    })
  • #5823 1f49cddf9 Thanks @delucis! - Generate content types when running astro check

  • #5832 2303f9514 Thanks @HiDeoo! - Add support for serving well-known URIs with the @astrojs/node SSR adapter

Patch Changes

Don't miss a new astro release

NewReleases is sending notifications on new releases.