Change8

astro@6.0.5

📦 astroView on GitHub →
🐛 10 fixes🔧 11 symbols

Summary

This patch release focuses on stability and correctness, fixing several issues related to server deferral in prerendered environments, build process leaks, and hydration script emission. It also resolves startup warnings and improves content schema validation.

🐛 Bug Fixes

  • Fixed dev routing for `server:defer` islands when adapters opt into handling prerendered routes, ensuring server island requests are treated as prerender-handler eligible to prevent 400 errors on prerendered pages using `prerenderEnvironment: 'node'`.
  • Fixed `astro:actions` validation to check resolved routes, preventing startup failures in projects using default static output with at least one `prerender = false` page or endpoint.
  • Avoided a `MaxListenersExceededWarning` during `astro dev` startup by increasing the shared Vite watcher listener limit when attaching content server listeners.
  • Fixed a 404 error during browser hydration by emitting the `before-hydration` script chunk for the `client` Vite environment (it was previously only emitted for `prerender` and `ssr`).
  • Fixed incorrect tracking of `<style>` tags inside SVG components when CSP is enabled.
  • Ensured custom prerenderers are always torn down during build, even if `getStaticPaths()` throws an error.
  • Fixed build process from incorrectly leaking the server entrypoint into the client environment, which caused adapter warnings.
  • Fixed a runtime bug where `server:defer` could fail in prerendered pages for some adapters (like Cloudflare), resulting in errors like `serverIslandMap?.get is not a function`.
  • Fixed JSON schema generation for content collection schemas that had differences between their input and output shapes.
  • Fixed `Astro.url.pathname` for the root page when using `build.format: "file"` so it resolves to `/index.html` instead of `/.html` during builds.

Affected Symbols