astro 1.0.0-rc.1

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
.mdfiles is no longer supported by default. It can be enabled by setting thelegacy.astroFlavoredMarkdownflag totrue. In the future, we will be pushing users to our new@astrojs/mdxIntegration 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.canonicalURLhas been replaced by the newAstro.urlhelper.- The Markdown
headersandgetHeaders()utils have been renamed toheadingsandgetHeadings(). - The deprecated
Markdowncomponent 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 devHMR has been overhauled to provide more stable live reload behaviorastro deverror handling has been overhauled to provide a more seamless error handling experience- The new
outputconfiguration option builds to'static' | 'server'targets .htmlcomponents and pages are now supported.mdxcomponents and pages are now supported via@astrojs/mdxserveroutput now supports custom404and500pagesserveroutput now exposesAstro.clientAddressto get the current IP address per request
Patch Changes
-
#3988
9841c21e8Thanks @Princesseuh! - Fix certain characters showing incorrectly inastro check -
#4000
1c1b9da62Thanks @tony-sull! - public assets should always take priority over page routes in SSR deployments -
#4042
7e5ac1f45Thanks @matthewp! - Ensure the before-hydration scripts are built -
#3944
e82ff13f1Thanks @mihkeleidast! - Add export keyword to astro config file stub created by add cli command -
#3942
21462feb4Thanks @AllanChain! - Use a base middleware for better base path handling in dev. -
#3991
4dd341c8aThanks @natemoo-re! - #3859 Overhaul Astro error handling, using Vite's built-in error overlay when possible -
#4024
1215e731bThanks @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
divtodiv.my-classwill match the previous behavior. -
#4046
c811be49aThanks @matthewp! - Adds warnings for legacy markdown behavior -
#4009
01ba07d8fThanks @matthewp! - Fixes Lit compat with Vite 3.0.1 -
#4008
399d7e269Thanks @bholmesdev! - Avoid parsing JSX, components, and Astro islands when using "plain" md mode. This bringsmarkdown.mode: 'md'in-line with our docs description. -
#4047
453c026aaThanks @matthewp! - Perf: move getStaticPaths call during the build to during page generation -
#3974
54865612eThanks @Princesseuh! - Added missingmediaattributes from the JSX definitions for themetaelement -
#3932
27ee8b97aThanks @natemoo-re! - Overhaul HMR handling for more stable live reload behavior -
#4044
6f88597c3Thanks @lostra01! - Added missing "loading" attribute to IFrameHTMLAttributes -
#3995
b2b367c96Thanks @bholmesdev! - Support YAML frontmatter in MDX files -
#3976
fbef6a7f7Thanks @natemoo-re! - Fixdefine:varsbugs with bothstyleandscript -
#4023
4ca6a0933Thanks @matthewp! - Fixes Node adapter to accept a request body -
#4010
d503c5bf3Thanks @matthewp! - Allow defining aliases with tsconfig -
#4032
beddf073bThanks @arimgibson! - Fix: find a hosting network differently based on Node version -- adjusted for Node v18.4+ -
#3867
7250e4e86Thanks @natemoo-re! - Add support for.htmlcomponents and pages -
#3959
ddefb172fThanks @FredKSchott! - Deprecate Astro.canonicalURL, in favor of Astro.url instead. -
#3968
95eaa207dThanks @bholmesdev! - Improve warning logs on astro.config change -
#3959
ddefb172fThanks @FredKSchott! - Add Astro.url helper for getting the request URL -
#4031
6e27a5fdcThanks @natemoo-re! - BREAKING Renamed Markdown utility functiongetHeaders()togetHeadings(). -
Updated dependencies [
ba11b3399,399d7e269,00fab4ce1,6e27a5fdc]:- @astrojs/markdown-remark@0.13.0