astro 2.0.0-beta.2
Major Changes
-
#5782
1f92d64eaThanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0 -
#5753
302e0ef8fThanks @bluwy! - Default preview host tolocalhostinstead of127.0.0.1. This allows the static server and integration preview servers to serve under ipv6. -
#5842
c4b0cb8bfThanks @natemoo-re! - Breaking Change: client assets are built to an_astrodirectory in the build output directory. Previously these were built to various locations, includingassets/,chunks/and the root of build output.You can control this location with the new
buildconfiguration option namedassets. -
#5825
52209ca2aThanks @bholmesdev! - Baseline the experimentalcontentCollectionsflag. You're free to remove this from your astro config!import { defineConfig } from 'astro/config'; export default defineConfig({ - experimental: { contentCollections: true } })
Minor Changes
-
#5786
c2180746bThanks @bholmesdev! - Move generated content collection types to a.astrodirectory. This replaces the previously generatedsrc/content/types.generated.d.tsfile.If you're using Git for version control, we recommend ignoring this generated directory by adding
.astroto your .gitignore.Astro will also generate the TypeScript reference path to include
.astrotypes in your project. This will update your project'ssrc/env.d.tsfile, or write one if none exists. -
#5826
840412128Thanks @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
1f49cddf9Thanks @delucis! - Generate content types when runningastro check -
#5832
2303f9514Thanks @HiDeoo! - Add support for serving well-known URIs with the @astrojs/node SSR adapter
Patch Changes
-
#5822
01f3f463bThanks @natemoo-re! - Fix edge case with bundle generation by emitting a single chunk for pages -
#5803
ae8a012a7Thanks @bluwy! - Upgrade compiler and handle breaking changes -
#5840
cf2de5422Thanks @chenxsan! - Persist CLI flags when restarting the dev server -
#5824
665a2c222Thanks @bholmesdev! - Better handle content type generation failures:- Generate types when content directory is empty
- Log helpful error when running
astro syncwithout a content directory - Avoid swallowing
config.tssyntax errors from Vite
-
#5829
23dc9ea96Thanks @giuseppelt! - FixCode.astroshiki css class replace logic -
#5836
63a6ceb38Thanks @natemoo-re! - Fix route matching when path includes special characters -
Updated dependencies [
1f92d64ea,12f65a4d5,16107b6a1,c55fbcb8e,1f92d64ea,52209ca2a,7572f7402]:- @astrojs/telemetry@2.0.0-beta.0
- @astrojs/markdown-remark@2.0.0-beta.2
- @astrojs/webapi@2.0.0-beta.0