astro 0.24.0
Minor Changes
-
#2760
77b9c953Thanks @bholmesdev! - Introduce a new --host flag + host devOption to expose your server on a network IP -
af075d81Thanks @natemoo-re! - Visual redesign of theastro devCLI, including newastro --helpandastro --versionoutputs.These changes introduce a new startup screen, make it more obvious when a file triggers in-place HMR (
update) or a full reload (reload), and improve the way Astro surfaces errors during dev. -
#2705
72c2c86eThanks @natemoo-re! - New default build strategyThis change marks the "static build" as the new default build strategy. If you are unfamiliar with this build strategy check out the migration guide on how to change your code to be compatible with this new bulid strategy.
If you'd like to keep using the old build strategy, use the flag
--legacy-buildboth in yourastro devandastro buildscripts, for ex:{ "scripts": { "build": "astro build --legacy-build" } }Note that the legacy build is deprecated and will be removed in a future version. You should only use this flag until you have the time to migration your code.
-
#2705
72c2c86eThanks @natemoo-re! - ## Updated<head>and<body>behaviorSince
astro@0.21, Astro placed certain restrictions on what files could use<head>or<body>tags. Inastro@0.24, the restrictions have been lifted. Astro will be able to correctly handle<head>and<body>tags in any component, not just those insrc/pages/orsrc/layouts/. -
#2747
05b66bd6Thanks @natemoo-re! - Escape HTML inside of expressions by default. Please see our migration guide for more details.
Patch Changes
-
#2695
ae8d9256Thanks @natemoo-re! - UpdateAstro.slotsAPI with new publichasandrendermethods.This is a backwards-compatible change—
Astro.slots.defaultwill still betrueif the component has been passed adefaultslot.if (Astro.slots.has('default')) { const content = await Astro.slots.render('default'); } -
#2755
10843abaThanks @natemoo-re! - Add user-configurablesitemapFilteroption.This option can be used to ensure certain pages are excluded from your final sitemap.
// astro.config.ts import type { AstroUserConfig } from 'astro' const config: AstroUserConfig = { sitemap: true, sitemapFilter: (page: string) => !page.includes('secret-page') } export default config -
#2767
2bb2c2f7Thanks @natemoo-re! - Update@astrojs/compilerto0.12.0 -
#2705
72c2c86eThanks @natemoo-re! - Fixes the static build to write to 404.html -
#2705
72c2c86eThanks @natemoo-re! - Fixes use of private .env variables with the static build -
#2750
79fc3204Thanks @FredKSchott! - update esbuild@0.14.25 -
#2737
e8d4e568Thanks @natemoo-re! - Astro's logger has been redesigned for an improved experience! In addition to deduping identical messages, we've surfaced more error details and exposed new events likeupdate(for in-place HMR) andreload(for full-reload HMR). -
#2733
6bf124fbThanks @FredKSchott! - Remove a bad dev warning -
#2768
49c0d997Thanks @matthewp! - Fixes loading astro/client/* on Windows in dev -
#2758
499fb6a3Thanks @natemoo-re! - Add CLI warnings when running a prerelease or outdated version of Astro -
#2705
72c2c86eThanks @natemoo-re! - Replacesenddependency withsirv -
#2732
0ae96bb7Thanks @bholmesdev! - Update server start message to use localhost for local hostnames -
#2743
a14075e2Thanks @bholmesdev! - Fix - show 404 for bad static paths with console message, rather than a 500