The Astro v1.0.0 Release Candidate comes includes new features, tons of bug fixes, and a few breaking changes to be aware of.
Migration Guide: https://docs.astro.build/en/migrate/
Breaking Changes
- Astro now uses Vite 3, which comes with its own Migration Guide.
- Components and JSX expressions in
.md
files is no longer supported by default. It can be enabled by setting thelegacy.astroFlavoredMarkdown
flag totrue
. In the future, we will be pushing users to our new@astrojs/mdx
Integration for using components in Markdown. - ‘@astrojs/image’ integration released!
- Astro scoped styles now respect their authored specificity (see RFC0012). Please visually inspect your site after upgrading to confirm that styles are working as expected.
Astro.canonicalURL
has been replaced by the newAstro.url
helper.- The Markdown
headers
andgetHeaders()
utils have been renamed toheadings
andgetHeadings()
. - The deprecated
Markdown
component has been removed from core and is now available as@astrojs/markdown-component
.
Read the full migration guide for more details on upgrading your existing project.
New Features
astro dev
HMR has been overhauled to provide more stable live reload behaviorastro dev
error handling has been overhauled to provide a more seamless error handling experience- The new
output
configuration option builds to'static' | 'server'
targets .html
components and pages are now supported.mdx
components and pages are now supported via@astrojs/mdx
server
output now supports custom404
and500
pagesserver
output now exposesAstro.clientAddress
to get the current IP address per request
Patch Changes
-
#3988
9841c21e8
Thanks @Princesseuh! - Fix certain characters showing incorrectly inastro check
-
#4000
1c1b9da62
Thanks @tony-sull! - public assets should always take priority over page routes in SSR deployments -
#4042
7e5ac1f45
Thanks @matthewp! - Ensure the before-hydration scripts are built -
#3944
e82ff13f1
Thanks @mihkeleidast! - Add export keyword to astro config file stub created by add cli command -
#3942
21462feb4
Thanks @AllanChain! - Use a base middleware for better base path handling in dev. -
#3991
4dd341c8a
Thanks @natemoo-re! - #3859 Overhaul Astro error handling, using Vite's built-in error overlay when possible -
#4024
1215e731b
Thanks @natemoo-re! - BREAKING Implement RFC0012 to preserve authored specificity for Astro scoped styles.If you use a mix of global styles and Astro scoped styles, please visually inspect your site after upgrading to confirm that styles are working as expected.
If you previously relied on Astro's scoped styles to increase the specificity of your selectors, please update your selectors to use an additional class. For example, updating
div
todiv.my-class
will match the previous behavior. -
#4046
c811be49a
Thanks @matthewp! - Adds warnings for legacy markdown behavior -
#4009
01ba07d8f
Thanks @matthewp! - Fixes Lit compat with Vite 3.0.1 -
#4008
399d7e269
Thanks @bholmesdev! - Avoid parsing JSX, components, and Astro islands when using "plain" md mode. This bringsmarkdown.mode: 'md'
in-line with our docs description. -
#4047
453c026aa
Thanks @matthewp! - Perf: move getStaticPaths call during the build to during page generation -
#3974
54865612e
Thanks @Princesseuh! - Added missingmedia
attributes from the JSX definitions for themeta
element -
#3932
27ee8b97a
Thanks @natemoo-re! - Overhaul HMR handling for more stable live reload behavior -
#4044
6f88597c3
Thanks @lostra01! - Added missing "loading" attribute to IFrameHTMLAttributes -
#3995
b2b367c96
Thanks @bholmesdev! - Support YAML frontmatter in MDX files -
#3976
fbef6a7f7
Thanks @natemoo-re! - Fixdefine:vars
bugs with bothstyle
andscript
-
#4023
4ca6a0933
Thanks @matthewp! - Fixes Node adapter to accept a request body -
#4010
d503c5bf3
Thanks @matthewp! - Allow defining aliases with tsconfig -
#4032
beddf073b
Thanks @arimgibson! - Fix: find a hosting network differently based on Node version -- adjusted for Node v18.4+ -
#3867
7250e4e86
Thanks @natemoo-re! - Add support for.html
components and pages -
#3959
ddefb172f
Thanks @FredKSchott! - Deprecate Astro.canonicalURL, in favor of Astro.url instead. -
#3968
95eaa207d
Thanks @bholmesdev! - Improve warning logs on astro.config change -
#3959
ddefb172f
Thanks @FredKSchott! - Add Astro.url helper for getting the request URL -
#4031
6e27a5fdc
Thanks @natemoo-re! - BREAKING Renamed Markdown utility functiongetHeaders()
togetHeadings()
. -
Updated dependencies [
ba11b3399
,399d7e269
,00fab4ce1
,6e27a5fdc
]:- @astrojs/markdown-remark@0.13.0