Minor Changes
-
#2760
77b9c953
Thanks @bholmesdev! - Introduce a new --host flag + host devOption to expose your server on a network IP -
af075d81
Thanks @natemoo-re! - Visual redesign of theastro dev
CLI, including newastro --help
andastro --version
outputs.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
72c2c86e
Thanks @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-build
both in yourastro dev
andastro build
scripts, 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
72c2c86e
Thanks @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
05b66bd6
Thanks @natemoo-re! - Escape HTML inside of expressions by default. Please see our migration guide for more details.
Patch Changes
-
#2695
ae8d9256
Thanks @natemoo-re! - UpdateAstro.slots
API with new publichas
andrender
methods.This is a backwards-compatible change—
Astro.slots.default
will still betrue
if the component has been passed adefault
slot.if (Astro.slots.has('default')) { const content = await Astro.slots.render('default'); }
-
#2755
10843aba
Thanks @natemoo-re! - Add user-configurablesitemapFilter
option.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
2bb2c2f7
Thanks @natemoo-re! - Update@astrojs/compiler
to0.12.0
-
#2705
72c2c86e
Thanks @natemoo-re! - Fixes the static build to write to 404.html -
#2705
72c2c86e
Thanks @natemoo-re! - Fixes use of private .env variables with the static build -
#2750
79fc3204
Thanks @FredKSchott! - update esbuild@0.14.25 -
#2737
e8d4e568
Thanks @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
6bf124fb
Thanks @FredKSchott! - Remove a bad dev warning -
#2768
49c0d997
Thanks @matthewp! - Fixes loading astro/client/* on Windows in dev -
#2758
499fb6a3
Thanks @natemoo-re! - Add CLI warnings when running a prerelease or outdated version of Astro -
#2705
72c2c86e
Thanks @natemoo-re! - Replacesend
dependency withsirv
-
#2732
0ae96bb7
Thanks @bholmesdev! - Update server start message to use localhost for local hostnames -
#2743
a14075e2
Thanks @bholmesdev! - Fix - show 404 for bad static paths with console message, rather than a 500