astro@7.0.0-beta.5
Breaking Changes📦 astroView on GitHub →
⚠ 1 breaking🐛 5 fixes🔧 1 symbols
Summary
This release defaults HTML compression to use JSX-style whitespace stripping, which may alter rendered output. Several bugs were fixed related to error handling and custom page rendering within advanced routing setups.
⚠️ Breaking Changes
- The default value for the `compressHTML` configuration option has changed from `true` (HTML-aware compression) to `'jsx'`. This means whitespace stripping now follows JSX rules by default, removing surrounding whitespace but preserving meaningful inline spaces. If you relied on the previous behavior, you must explicitly set `compressHTML: true` (for HTML-aware compression) or `compressHTML: false` (to preserve all whitespace) in your configuration.
Migration Steps
- If you require the previous HTML-aware whitespace compression, update your configuration to set `compressHTML: true`.
- If you require all whitespace to be preserved, update your configuration to set `compressHTML: false`.
🐛 Bug Fixes
- Fixed an issue where advanced routing (`astro/hono` / `astro/fetch`) `pages()` handler returned a generic Internal Server Error instead of rendering the custom `500.astro` page when a page threw during render.
- Fixed an issue where unmatched requests with a prerendered or absent custom 404 page failed instead of rendering the 404 error page when using advanced routing.
- Fixed an issue where advanced routing (`astro/hono` / `astro/fetch`) `middleware()` handler returned a generic Internal Server Error instead of rendering the custom `500.astro` page when middleware threw.
- Fixed the custom `500.astro` page receiving an empty `error` prop when the error originated in middleware within advanced routing.
- Fixed internal Astro headers leaking from direct `pages()` handler responses.