-
#2705
8ce63ee6
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.
- Updated
<head>
and<body>
behavior
Since
[email protected]
, Astro placed certain restrictions on what files could use<head>
or<body>
tags. In[email protected]
, 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/
. - Updated
- #2705
176d4082
Thanks @natemoo-re! - Fixes use of private .env variables with the static build
- #2705
a483c044
Thanks @natemoo-re! - Replacesend
dependency withsirv
- Updated dependencies [
0d37f8e0
]:- @astrojs/[email protected]
- Updated dependencies [
5f91e007
]:- @astrojs/[email protected]
-
#2706
b2c37385
Thanks @JuanM04! - Changeddata-astro-raw
tois:raw
internally -
Updated dependencies [
b2c37385
]:- @astrojs/[email protected]
- #2697
91765d79
Thanks @FredKSchott! - Improve build performance by processingssrPreload
in serial rather than in parallel
-
#2684
c7bbb112
Thanks @natemoo-re! - Fix issue where HMR could be triggered duringastro build
-
Updated dependencies [
91765d79
]:- @astrojs/[email protected]
- #2681
046af364
Thanks @natemoo-re! - Fix HMR regression related to fine-grained.astro
HMR. This fixes HMR for Tailwind and CSS styles when.astro
files are edited.
- #2665
0494f74e
Thanks @natemoo-re! - Improve compatability with third-party Astro packages
- #2656
fca64073
Thanks @FredKSchott! - fix astro scoping of "@import" inside of style tags
ac6d2e8c
Thanks @FredKSchott! - Fix issue with Non-HTML pages in static build for dev
- #2653
17032cd0
Thanks @natemoo-re! - Update@astrojs/compiler
, fixing a bug with self-closing tags that need special consideration like<title />
and<script />
- #2654
a0fc5cb5
Thanks @FredKSchott! - Fix an issue where utf8 encoding was skipped in the dev server.
- #2649
5091d788
Thanks @natemoo-re! - Add fine-grained HMR support for Astro files
-
#2645
2e5c3b51
Thanks @xavikortes! - Fix issue when process.env.LANG was longer than 5 characters -
Updated dependencies [
9b7e2ab2
]:- @astrojs/[email protected]
-
#2489
618a16f5
Thanks @natemoo-re! - Add support for theset:html
andset:text
directives.With the introduction of these directives, unescaped HTML content in expressions is now deprecated. Please migrate to
set:html
in order to continue injecting unescaped HTML in future versions of Astroβyou can use<Fragment set:html={content}>
to avoid a wrapper element.set:text
allows you to opt-in to escaping now, but it will soon become the default.
-
#2494
d7149f9b
Thanks @FredKSchott! - Refactor dev server to use vite server internally.This should be an invisible change, and no breaking changes are expected from this change. However, it is a big enough refactor that some unexpected changes may occur. If you've experienced a regression in the dev server, it is most likely a bug!
-
#2586
d6d35bca
Thanks @tony-sull! - Support for non-HTML pagesβ οΈ This feature is currently only supported with the--experimental-static-build
CLI flag. This feature may be refined over the next few weeks/months as SSR support is finalized.This adds support for generating non-HTML pages form
.js
and.ts
pages during the build. Built file and extensions are based on the source file's name, ex:src/pages/data.json.ts
will be built todist/data.json
.Is this different from SSR? Yes! This feature allows JSON, XML, etc. files to be output at build time. Keep an eye out for full SSR support if you need to build similar files when requested, for example as a serverless function in your deployment host.
// src/pages/company.json.ts export async function get() { return { body: JSON.stringify({ name: 'Astro Technology Company', url: 'https://astro.build/', }), }; }
What about
getStaticPaths()
? It just worksβ’.export async function getStaticPaths() { return [ { params: { slug: 'thing1' }}, { params: { slug: 'thing2' }} ] } export async function get(params) { const { slug } = params return { body: // ...JSON.stringify() } }
-
#2424
1abb9ed0
Thanks @natemoo-re! - Upgradevite
to2.8.x
, unvendoringvite
and bringing Astro's dependencies up-to-date.This is a low-level change that you shouldn't have to worry about too much, but it should fix many, many issues with CJS/ESM interoperability. It also allows Astro to stay up-to-date with the
vite
ecosystem. If you run into any unexpected problems, please let us know by opening an issue.
-
#2471
c9bb1147
Thanks @FredKSchott! - Standardize trailing subpath behavior in config.Most users are not aware of the subtle differences between
/foo
and/foo/
. Internally, we have to handle both which means that we are constantly worrying about the format of the URL, needing to add/remove trailing slashes when we go to work with this property, etc. This change transforms allsite
values to use a trailing slash internally, which should help reduce bugs for both users and maintainers.
-
#2548
ba5e2b5e
Thanks @matthewp! - Experimental SSR Supportβ οΈ If you are a user of Astro and see this PR and think that you can start deploying your app to a server and get SSR, slow down a second! This is only the initial flag and very basic support. Styles are not loading correctly at this point, for example. Like we did with the--experimental-static-build
flag, this feature will be refined over the next few weeks/months and we'll let you know when its ready for community testing.-
This adds a new
--experimental-ssr
flag toastro build
which will result indist/server/
anddist/client/
directories. -
SSR can be used through this API:
import { createServer } from 'http'; import { loadApp } from 'astro/app/node'; const app = await loadApp(new URL('./dist/server/', import.meta.url)); createServer((req, res) => { const route = app.match(req); if (route) { let html = await app.render(req, route); } }).listen(8080);
-
This API will be refined over time.
-
This only works in Node.js at the moment.
-
Many features will likely not work correctly, but rendering HTML at least should.
-
- #2424
1abb9ed0
Thanks @natemoo-re! - Fixes HMR of CSS that is imported from astro, when using the static build flag
- #2506
187d5128
Thanks @jonathantneal! - Fix an issue rendering content within HTMLElement
- #2599
929fae68
Thanks @natemoo-re! - Update@astrojs/compiler
tov0.11.0
, which moves from TinyGo to Go's built-in WASM output. This will be a significant improvement for stability and memory safety.
-
#2552
e81bc3cf
Thanks @matthewp! - Fixes build slowness on large appsThis fixes slowness on large apps, particularly during the static build. Fix is to prevent the Vite dev server plugin from being run during build, as it is not needed.
- #2588
10216176
Thanks @matthewp! - Fix for passing children to client component when the component does not render them
- #2531
ef1d81ef
Thanks @FredKSchott! - Fix issue where hostname was not passed to dev server
- #2537
b0666286
Thanks @FredKSchott! - Improve debug logs
- #2511
3d2c1849
Thanks @matthewp! - Bug fix fordefine:vars
with the --experimental-static-build flag
- #2518
2bc91543
Thanks @JuanM04! - Added the ability to use custom themes and langs with Shiki (<Code />
and@astrojs/markdown-remark
)
-
#2612
39cbe500
Thanks @natemoo-re! - Improve suppport forimport.meta.env
.Prior to this change, all variables defined in
.env
files had to include thePUBLIC_
prefix, meaning that they could potentially be visible to the client if referenced.Now, Astro includes any referenced variables defined in
.env
files onimport.meta.env
during server-side rendering, but only referencedPUBLIC_
variables on the client.
-
#2471
c9bb1147
Thanks @FredKSchott! - Respect subpath URL paths in the fetchContent url property.This fixes an issue where fetchContent() URL property did not include the buildOptions.site path in it.
-
#2538
16d532fe
Thanks @natemoo-re! - Fix rendering of HTML boolean attributes likeopen
andasync
.Fix rendering of HTML and SVG enumerated attributes like
contenteditable
andspellcheck
.
- #2581
ec6f148f
Thanks @matthewp! - Fix for resolving relative imports from hoisted scripts in the static build.
- #2593
40c0e2b3
Thanks @tony-sull! - Dynamic route params should ignore param order when matching paths
-
#2594
085468e9
Thanks @natemoo-re! - Upgrade@astrojs/compiler
tov0.10.2
-
Updated dependencies [
a907a73b
,cfeaa941
,2bc91543
,6fe1b027
,2bc91543
,d71c4620
]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- #2599
929fae68
Thanks @natemoo-re! - Update@astrojs/compiler
tov0.11.0
, which moves from TinyGo to Go's built-in WASM output. This will be a significant improvement for stability and memory safety.
- #2588
10216176
Thanks @matthewp! - Fix for passing children to client component when the component does not render them
- #2593
40c0e2b3
Thanks @tony-sull! - Dynamic route params should ignore param order when matching paths
-
#2586
d6d35bca
Thanks @tony-sull! - Support for non-HTML pagesβ οΈ This feature is currently only supported with the--experimental-static-build
CLI flag. This feature may be refined over the next few weeks/months as SSR support is finalized.This adds support for generating non-HTML pages form
.js
and.ts
pages during the build. Built file and extensions are based on the source file's name, ex:src/pages/data.json.ts
will be built todist/data.json
.Is this different from SSR? Yes! This feature allows JSON, XML, etc. files to be output at build time. Keep an eye out for full SSR support if you need to build similar files when requested, for example as a serverless function in your deployment host.
// src/pages/company.json.ts export async function get() { return { body: JSON.stringify({ name: 'Astro Technology Company', url: 'https://astro.build/', }), }; }
What about
getStaticPaths()
? It just worksβ’.export async function getStaticPaths() { return [ { params: { slug: 'thing1' }}, { params: { slug: 'thing2' }} ] } export async function get(params) { const { slug } = params return { body: // ...JSON.stringify() } }
-
#2548
ba5e2b5e
Thanks @matthewp! - Experimental SSR Supportβ οΈ If you are a user of Astro and see this PR and think that you can start deploying your app to a server and get SSR, slow down a second! This is only the initial flag and very basic support. Styles are not loading correctly at this point, for example. Like we did with the--experimental-static-build
flag, this feature will be refined over the next few weeks/months and we'll let you know when its ready for community testing.-
This adds a new
--experimental-ssr
flag toastro build
which will result indist/server/
anddist/client/
directories. -
SSR can be used through this API:
import { createServer } from 'http'; import { loadApp } from 'astro/app/node'; const app = await loadApp(new URL('./dist/server/', import.meta.url)); createServer((req, res) => { const route = app.match(req); if (route) { let html = await app.render(req, route); } }).listen(8080);
-
This API will be refined over time.
-
This only works in Node.js at the moment.
-
Many features will likely not work correctly, but rendering HTML at least should.
-
- #2581
ec6f148f
Thanks @matthewp! - Fix for resolving relative imports from hoisted scripts in the static build.
- #2594
085468e9
Thanks @natemoo-re! - Upgrade@astrojs/compiler
tov0.10.2
-
#2569
82544e41
Thanks @matthewp! - Fixes pageUrlFormat: 'file' in the static build -
Updated dependencies [
d71c4620
]:- @astrojs/[email protected]
-
#2424
1abb9ed0
Thanks @natemoo-re! - Upgradevite
to2.8.x
, unvendoringvite
and bringing Astro's dependencies up-to-date.This is a low-level change that you shouldn't have to worry about too much, but it should fix many, many issues with CJS/ESM interoperability. It also allows Astro to stay up-to-date with the
vite
ecosystem. If you run into any unexpected problems, please let us know by opening an issue.
-
#2424
1abb9ed0
Thanks @natemoo-re! - Fixes HMR of CSS that is imported from astro, when using the static build flag -
Updated dependencies [
a907a73b
]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
#2552
e81bc3cf
Thanks @matthewp! - Fixes build slowness on large appsThis fixes slowness on large apps, particularly during the static build. Fix is to prevent the Vite dev server plugin from being run during build, as it is not needed.
- #2531
ef1d81ef
Thanks @FredKSchott! - Fix issue where hostname was not passed to dev server
- #2537
b0666286
Thanks @FredKSchott! - Improve debug logs
- #2518
2bc91543
Thanks @JuanM04! - Added the ability to use custom themes and langs with Shiki (<Code />
and@astrojs/markdown-remark
)
-
#2538
16d532fe
Thanks @natemoo-re! - Fix rendering of HTML boolean attributes likeopen
andasync
.Fix rendering of HTML and SVG enumerated attributes like
contenteditable
andspellcheck
. -
Updated dependencies [
cfeaa941
,2bc91543
,2bc91543
]:- @astrojs/[email protected]
-
#2489
618a16f5
Thanks @natemoo-re! - Add support for theset:html
andset:text
directives.With the introduction of these directives, unescaped HTML content in expressions is now deprecated. Please migrate to
set:html
in order to continue injecting unescaped HTML in future versions of Astroβyou can use<Fragment set:html={content}>
to avoid a wrapper element.set:text
allows you to opt-in to escaping now, but it will soon become the default.
-
#2494
d7149f9b
Thanks @FredKSchott! - Refactor dev server to use vite server internally.This should be an invisible change, and no breaking changes are expected from this change. However, it is a big enough refactor that some unexpected changes may occur. If you've experienced a regression in the dev server, it is most likely a bug!
-
#2471
c9bb1147
Thanks @FredKSchott! - Standardize trailing subpath behavior in config.Most users are not aware of the subtle differences between
/foo
and/foo/
. Internally, we have to handle both which means that we are constantly worrying about the format of the URL, needing to add/remove trailing slashes when we go to work with this property, etc. This change transforms allsite
values to use a trailing slash internally, which should help reduce bugs for both users and maintainers.
- #2506
187d5128
Thanks @jonathantneal! - Fix an issue rendering content within HTMLElement
- #2511
3d2c1849
Thanks @matthewp! - Bug fix fordefine:vars
with the --experimental-static-build flag
-
#2471
c9bb1147
Thanks @FredKSchott! - Respect subpath URL paths in the fetchContent url property.This fixes an issue where fetchContent() URL property did not include the buildOptions.site path in it.
-
Updated dependencies [
6fe1b027
]:- @astrojs/[email protected]
- #2491
c7a6ed9a
Thanks @jonathantneal! - Fixed top-level await and other es features with the static build
- #2479
005751a9
Thanks @natemoo-re! - Add theescapeHTML
utility toastro/internal
- #2491
c7a6ed9a
Thanks @jonathantneal! - Renders server-side HTMLElement as HTML tag
- #2440
462e3159
Thanks @matthewp! - Fixes HMR of CSS that is imported from astro, when using the static build flag
- #2443
ed0b46f9
Thanks @natemoo-re! - Fix bug with RSS feed generation.rss()
can now be called multiple times and URLs can now be fully qualified.
- #2371
85ad1aab
Thanks @natemoo-re! - Add support for styled RSS feeds using the newstylesheet
option
-
#2392
24aa3245
Thanks @obnoxiousnerd! - Support markdown draft pages. Markdown draft pages are markdown pages which havedraft
set in their frontmatter. By default, these will not be built by Astro while runningastro build
. To disable this behavior, you need to setbuildOptions.drafts
totrue
or pass the--drafts
flag while runningastro build
. An exaple of a markdown draft page is:--- # src/pages/blog-post.md title: My Blog Post draft: true --- This is my blog post which is currently incomplete.
- #2391
c8a257ad
Thanks @matthewp! - Improvements performance for building sites with thousands of pages with the static build
-
#2373
92532b88
Thanks @matthewp! - Hydrated component fix with the static build -
Updated dependencies [
20eaddb2
]:- @astrojs/[email protected]
- #2335
f008a19c
Thanks @jonathantneal! - Preserve pathnames for sitemap.xml
- #2323
69af658b
Thanks @jonathantneal! - Fix issue with plugins running twice in dev and build
- #2338
c0cb7eea
Thanks @jonathantneal! - Fix preview issues triggered by pageUrlFormat & trailingSlash options
- #2324
77ef43e6
Thanks @natemoo-re! - Update compiler to remove console.log (sorry everyone!)
e0de21ef
Thanks @FredKSchott! - Add<guid>
to RSS feed.
- #2318
c0204c0a
Thanks @natemoo-re! - Update@astrojs/compiler
to0.7.3
- #2319
e6379d51
Thanks @jonathantneal! - Updated @astropub/webapi
- #2299
5fbdd56f
Thanks @tadeuzagallo! - Fix dynamic routes for sites with subpath
- #2308
e98659b7
Thanks @natemoo-re! - Update the Astro compiler, fixing a number of bugs
-
#2305
193ca60f
Thanks @matthewp! - Fixesastro check
errors with import.meta usage -
Updated dependencies [
34486676
]:- @astrojs/[email protected]
- #2292
2e55dc26
Thanks @matthewp! - Rolls back a feature flag feature that was breaking the docs site
- #2202
45cea6ae
Thanks @jonathantneal! - Officially drop support for Node v12. The minimum supported version is now Node v14.15+,
c5a7305f
Thanks @natemoo-re! - Replacefetch
detection via Vite plugin with a more resilientglobalThis
polyfill
-
#2240
e07c1cbd
Thanks @FredKSchott! - Pin vite to v2.6, since that is the version that we have vendored. -
Updated dependencies [
45cea6ae
]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- Updated dependencies [
b8c821a0
]:- @astrojs/[email protected]
- #2115
0ef682c9
Thanks @FredKSchott! - Improve error message on bad JS/TS frontmatter
- #2137
cc1dae55
Thanks @natemoo-re! - Exclude 404 pages from sitemap generation
- #2135
77c3fda3
Thanks @natemoo-re! - Patchfetch
support to prioritize authored code. Existingfetch
imports and declarations are respected.
-
#2117
8346a1f2
Thanks @natemoo-re! - Fixes regression introduced in@astrojs/compiler
related to active formatting elementsSee CHANGELOG.
-
#2107
4c444676
Thanks @matthewp! - Fixes regression in build caused by use of URL moduleUsing this module breaks the build because Vite tries to shim it, incorrectly.
- #2096
11798a32
Thanks @jonathantneal! - Updates @astro/compiler and @astro/language-server.
- #2078
ac3e8702
Thanks @natemoo-re! - Fix behavior of renderers when no children are passed in
- #2064
5bda895f
Thanks @jonathantneal! - Fixes an issue where void elements are rendered with opening and closing tags.
- #2076
920d3da1
Thanks @tony-sull! - Improving build validation and error messages for client hydration directives
-
#2075
b348ca6c
Thanks @drwpow! - Bugfix: allow dynamic importing of rehype plugins -
Updated dependencies [
ac3e8702
]:- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- #2050
4e06767c
Thanks @natemoo-re! - Fixastro preview
port retry logic
-
341ec3cd: Fixes dev errors in hydrated components
The errors would occur when there was state changes in hydrated components. This only occurs in dev but does result in the hydrated component not working. This fixes the underlying issue.
-
4436592d: Fix crash with unexpected file types in pages directory
-
50f3b8d7: Bugfix: improve style and script injection for partial pages
-
fad6bd09: Fixes use of
PUBLIC_
to reference env varsPreviously
PUBLIC_
worked in server-only components such as .astro components. However if you had a client-side component you had to useVITE_
. This was a bug with our build that is now fixed.
- 76559faa: Chore: update compiler
- 8a5de030: Fix client:visible with multiple copies of same component
- 9ed6b3c0: Update compiler with the following patches:
- Fix components supporting only one style or script
- Fix regression where leading
<style>
elements could break generated tags - Fix case-sensitivity of void elements
- Fix expressions not working within SVG elements
- Fix panic when preprocessed style is empty
- 7a7427e4: Fix CSS URLs on Windows
- Updated dependencies [4cec1256]
- @astrojs/[email protected]
- 22dd6bf6: Support
lang="postcss"
in addition tolang="pcss"
- d3476f24: Bump Sass dependency version
- 679d4395: Added
MarkdownParser
andMarkdownParserResponse
to@types
- e4945232: Fix a host of compiler bugs, including:
- CSS scoping of
*
character inside ofcalc()
expressions - Encoding of double quotes inside of quoted attributes
- Expressions inside of
<table>
elements
- CSS scoping of
- 8cb77959: Fixes building of non-hoisted scripts
- fc5f4163: Fix regression with
astro build
404.astro output - Updated dependencies [679d4395]
- @astrojs/[email protected]
- 8775730e: Fix CSS scanning bug that could lead to infinite loops
- aec4e8da: Fix client:only behavior when only a single renderer is configured
-
e6aaeff5: Astro 0.21 is here! Read the complete migration guide.
This new version of Astro includes:
- A new, faster, Go-based compiler
- A completely new runtime backed by Vite, with significantly dev experience improvements
- Improved support for loading Astro config files, including
.cjs
,.js
, and.ts
files - And many more features!
- Updated dependencies [e6aaeff5]
- Updated dependencies [e6aaeff5]
- Updated dependencies [e6aaeff5]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 8733599e: Adds missing vite dependency, vixing svelte and vue
- 2e0c790b: Fix Lit renderer built
- 00d2b625: Add Vite dependencies to astro
- Updated dependencies [00d2b625]
- @astrojs/[email protected]
- c7682168: Fix build by making vendored vite resolve to copy
- 41c6a772: Fix for dev server not starting
- 3b511059: Fix for OSX .astro file corruption
- c82ceff7: Bug fix for Debug when passed JSON contain HTML strings
- 53d9cf5e: Fixes dev server not stopping cleanly
- 8986d33b: Improve error display
- Updated dependencies [8986d33b]
- @astrojs/[email protected]
- dbc49ed6: Fix HMR regression
- 6b598b24: Fix middleware order
- 0ce86dfd: Fixes Vue scoped styles when built
- dbc49ed6: Fix HMR regression
- 6b598b24: Fix middleware order
- 0ce86dfd: Fixes Vue scoped styles when built
- 0f9c1910: Fixes routing regression in next.4. Subpath support was inadvertedly prevent any non-index routes from working when not using a subpath.
-
b958088c: Make astro-root be a display: contents element
-
65d17857: Fixes hoisted scripts to be bundled during the build
-
3b8f201c: Add build output
-
824c1f20: Re-implement client:only support
-
3cd1458a: Bugfix: Bundled CSS missing files on Windows
-
4e55be90: Fixes layout file detection on non-unix environments
-
fca1a99d: Provides first-class support for a site deployed to a subpath
Now you can deploy your site to a subpath more easily. Astro will use your
buildOptions.site
URL and host the dev server from there.If your site config is
https://example.com/blog
you will need to go tohttps://localhost:3000/blog/
in dev and when usingastro preview
.Includes a helpful 404 page when encountering this in dev and preview.
-
65216ef9: Bugfix: PostCSS not working in all contexts
-
Updated dependencies [3cd1458a]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 7eaabbb0: Fix error with Markdown content attribute parsing
- fd52bcee: Update the build to build/bundle assets
- 7eaabbb0: Fix bug with attribute serialization
- Updated dependencies [7eaabbb0]
- @astrojs/[email protected]
- fbae2bc5: Improve support for Astro config files.
In addition to properly loading .cjs
and .js
files in all cases, Astro now supports astro.config.ts
files.
For convenience, you may now also move your astro.config.js
file to a top-level config/
directory.
- 2e1bded7: Improve Tailwind HMR in
dev
mode - Fix bug when using
<Markdown></Markdown>
with no content - Support
PUBLIC_
prefixed.env
variables - Respect
tsconfig.json
andjsconfig.json
paths as aliases
-
11ee158a: Fix issue with
style
andscript
processing where siblings would be skippedFix
Fragment
and<>
handling for backwards compatabilityFix CSS
--custom-proprty
parsing when using scoped CSS
-
d84bfe71: Astro 0.21 Beta release! This introduces the new version of Astro that includes:
- A new, faster, Go-based compiler
- A runtime backed by Vite, with faster dev experience
- New features
See more at https://astro.build/blog/astro-021-preview/
- Updated dependencies [d84bfe71]
- Updated dependencies [d84bfe71]
- Updated dependencies [d84bfe71]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- Updated dependencies [31d06880]
- @astrojs/[email protected]
- 6813106a: Improve getStaticPaths memoization to successfully store values in the cache
-
dbd2f507: Adds the
astro check
commandThis adds a new command,
astro check
which runs diagnostics on a project. The same diagnostics run within the Astro VSCode plugin! Just run:astro check
Which works a lot like
tsc
and will give you error messages, if any were found. We recommend adding this to your CI setup to prevent errors from being merged.
- Updated dependencies [756e3769]
- @astrojs/[email protected]
- 30835635: Fixed props shadowing
- 3a0dcbe9: Fix pretty byte output in build stats
- 98d785af: Expose slots to components
- dd92871f: During CSS bundling separate processing of
rel="preload"
from normal loading stylesheets, to preserve preloads, and source element attributes likemedia
. - d771dad6: Remove check for referenced files
- 9cf2df81: Improve stats logging to use
pretty-bytes
so that 20B doesn't get output as 0kB, which is accurate, but confusing - 09b2f0e4: Fix passing Markdown content through props (#1259)
- Updated dependencies [97d37f8f]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- b03f8771: Add human readable config verification errors
- b03f8771: Sitemaps will not create entries for 404.html pages
- b03f8771: Fix parsing of an empty
<pre></pre>
tag in markdown files, which expected the pre tag to have a child - b03f8771: Add new
<Code>
component, powered by the more modern shiki syntax highlighter. - b03f8771: Fix astro bin bug in some pre-ESM versions of Node v14.x
- Updated dependencies [b03f8771]
- Updated dependencies [b03f8771]
- @astrojs/[email protected]
- 231964f0: Adds interfaces for built-in components
- 290f2032: Fix knownEntrypoint warning for __astro_hoisted_scripts.js
-
788c769d: # Hoisted scripts
This change adds support for hoisted scripts, allowing you to bundle scripts together for a page and hoist them to the top (in the head):
<script hoist> // Anything goes here! </script>
-
Updated dependencies [5d2ea578]
- @astrojs/[email protected]
- ff92be63: Add a new "astro preview" command
-
affcd04f: [BREAKING CHANGE] stop bundling, building, and processing public files. This fixes an issue where we weren't actually honoring the "do not process" property of the public directory.
If you were using the
public/
directory as expected and not using it to build files for you, then this should not be a breaking change. However, will notice that these files are no longer bundled.If you were using the
public/
directory to build files (for example, likepublic/index.scss
) then you can expect this to no longer work. As per the correct Astro documentation.
- Updated dependencies [397d8f3d]
- @astrojs/[email protected]
- 44fb8ebc: Remove non-null assertions, fix lint issues and enable lint in CI.
- 9482fade: Makes sure Astro.resolve works in nested component folders
-
f9cd0310: Fix TypeScript "types" reference in package.json
-
f9cd0310: Improve schema validation using zod
-
efb41f22: Add
<Debug>
component for JavaScript-free client-side debugging.--- import Debug from 'astro/debug'; const obj = { /* ... */ } --- <Debug {obj} />
- 3e605d7e: Add real-world check for ESM-CJS compatability to preflight check
- 1e0e2f41: Including Prism's
language-
class on code block<pre>
tags - 166c9ed6: Fix an issue where getStaticPaths is called multiple times per build
- c06da5dd: Add configuration options for url format behavior: buildOptions.pageDirectoryUrl & trailingSlash
- c06da5dd: Move 404.html output from /404/index.html to /404.html
- ece0953a: Fix CSS :global() selector bug
- Updated dependencies [a421329f]
- @astrojs/[email protected]
-
239065e2: [BREAKING] Replace the Collections API with new file-based routing.
This is a breaking change which impacts collections, pagination, and RSS support. Runtime warnings have been added to help you migrate old code to the new API. If you have trouble upgrading, reach out on https://astro.build/chat
This change was made due to confusion around our Collection API, which many users found difficult to use. The new file-based routing approach should feel more familiar to anyone who has used Next.js or SvelteKit.
Documentation added:
-
239065e2: Adds support for Astro.resolve
Astro.resolve()
helps with creating URLs relative to the current Astro file, allowing you to reference files within yoursrc/
folder.Astro does not resolve relative links within HTML, such as images:
<img src="../images/penguin.png" />
The above will be sent to the browser as-is and the browser will resolve it relative to the current page. If you want it to be resolved relative to the .astro file you are working in, use
Astro.resolve
:<img src={Astro.resolve('../images/penguin.png')} />
-
239065e2: Adds support for client:only hydrator
The new
client:only
hydrator allows you to define a component that should be skipped during the build and only hydrated in the browser.In most cases it is best to render placeholder content during the build, but that may not always be feasible if an NPM dependency attempts to use browser APIs as soon as is imported.
Note If more than one renderer is included in your Astro config, you need to include a hint to determine which renderer to use. Renderers will be matched to the name provided in your Astro config, similar to
<MyComponent client:only="@astrojs/renderer-react" />
. Shorthand can be used for@astrojs
renderers, i.e.<MyComponent client:only="react" />
will use@astrojs/renderer-react
.An example usage:
--- import BarChart from '../components/BarChart.jsx'; --- <BarChart client:only /> /** * If multiple renderers are included in the Astro config, * this will ensure that the component is hydrated with * the Preact renderer. */ <BarChart client:only="preact" /> /** * If a custom renderer is required, use the same name * provided in the Astro config. */ <BarChart client:only="my-custom-renderer" />
This allows you to import a chart component dependent on d3.js while making sure that the component isn't rendered at all at build time.
- @astrojs/[email protected]
-
1971ab3c: Adds support for client:only hydrator
The new
client:only
hydrator allows you to define a component that should be skipped during the build and only hydrated in the browser.In most cases it is best to render placeholder content during the build, but that may not always be feasible if an NPM dependency attempts to use browser APIs as soon as is imported.
Note If more than one renderer is included in your Astro config, you need to include a hint to determine which renderer to use. Renderers will be matched to the name provided in your Astro config, similar to
<MyComponent client:only="@astrojs/renderer-react" />
. Shorthand can be used for@astrojs
renderers, i.e.<MyComponent client:only="react" />
will use@astrojs/renderer-react
.An example usage:
--- import BarChart from '../components/BarChart.jsx'; --- <BarChart client:only /> /** * If multiple renderers are included in the Astro config, * this will ensure that the component is hydrated with * the Preact renderer. */ <BarChart client:only="preact" /> /** * If a custom renderer is required, use the same name * provided in the Astro config. */ <BarChart client:only="my-custom-renderer" />
This allows you to import a chart component dependent on d3.js while making sure that the component isn't rendered at all at build time.
-
1f13e403: Fix CSS scoping issue
-
78b5bde1: Adds support for Astro.resolve
Astro.resolve()
helps with creating URLs relative to the current Astro file, allowing you to reference files within yoursrc/
folder.Astro does not resolve relative links within HTML, such as images:
<img src="../images/penguin.png" />
The above will be sent to the browser as-is and the browser will resolve it relative to the current page. If you want it to be resolved relative to the .astro file you are working in, use
Astro.resolve
:<img src={Astro.resolve('../images/penguin.png')} />
- 089d1e7a: update dependencies, and fix a bad .flat() call
- c881e71e: Revert 939b9d0 "Allow dev server port to be set by PORT environment variable"
-
0f0cc2b9: [BREAKING] Replace the Collections API with new file-based routing.
This is a breaking change which impacts collections, pagination, and RSS support. Runtime warnings have been added to help you migrate old code to the new API. If you have trouble upgrading, reach out on https://astro.build/chat
This change was made due to confusion around our Collection API, which many users found difficult to use. The new file-based routing approach should feel more familiar to anyone who has used Next.js or SvelteKit.
Documentation added:
- 2321b577: - Allow Markdown with scoped styles to coexist happily with code syntax highlighting via Prism
- 618ea3a8: Properly escapes script tags with nested client:load directives when passing Astro components into framework components via props. Browsers interpret script end tags in strings as script end tags, resulting in syntax errors.
- 939b9d01: Allow dev server port to be set by
PORT
environment variable - Updated dependencies [1339d5e3]
- @astrojs/[email protected]
- 8cf0e65a: Fixes a previous revert, makes sure head content is injected into the right place
- 8cf0e65a: Refactor the CLI entrypoint to support stackblitz and improve the runtime check
- b1959f0f: Reverts a change to head content that was breaking docs site
- 268a36f3: Fixes issue with head content being rendered in the wrong place
- 39df7952: Makes
fetch
available in all framework components - Updated dependencies [f7e86150]
- @astrojs/[email protected]
- 27672096: Exclude remote srcset URLs
- 03349560: Makes Astro.request available in Astro components
- a1491cc6: Fix Vue components nesting
- Updated dependencies [cd2b5df4]
- Updated dependencies [a1491cc6]
- @astrojs/[email protected]
- @astrojs/[email protected]
- Updated dependencies [460e625]
- @astrojs/[email protected]
- Updated dependencies [7015356]
- @astrojs/[email protected]
- 829d5ba: Fix TSX issue with JSX multi-rendering
- 23b0d2d: Adds support for image srcset to the build
- Updated dependencies [70f0a09]
- Updated dependencies [fdb1c15]
- @astrojs/[email protected]
- @astrojs/[email protected]
- d8cebb0: Removes a warning in Svelte hydrated components
- e90615f: Fixes warnings for Astro internals for fetch-content and slots
-
f67e8f5: New Collections API (createCollection)
BREAKING CHANGE: The expected return format from createCollection() has been changed. Visit https://docs.astro.build/core-concepts/collections to learn the new API.
This feature was implemented with backwards-compatible deprecation warnings, to help you find and update pages that are using the legacy API.
-
40c882a: Fix url to find page with "index" at the end file name
-
0340b0f: Adds support for the client:media hydrator
The new
client:media
hydrator allows you to define a component that should only be loaded when a media query matches. An example usage:--- import Sidebar from '../components/Sidebar.jsx'; --- <Sidebar client:media="(max-width: 700px)" />
This allows you to define components which, for example, only run on mobile devices. A common example is a slide-in sidebar that is needed to add navigation to a mobile app, but is never displayed in desktop view.
Since Astro components can have expressions, you can move common media queries to a module for sharing. For example here are defining:
media.js
export const MOBILE = '(max-width: 700px)';
And then you can reference this in your page:
index.astro
import Sidebar from '../components/Sidebar.jsx'; import { MOBILE } from '../media.js'; ---(<Sidebar client:media={MOBILE} />);
-
e89a99f: This includes the props passed to a hydration component when generating the hash/id. This prevents multiple instances of the same component with differing props to be treated as the same component when hydrated by Astro.
-
b8af49f: Added sass support
-
a7e6666: compile javascript to target Node v12.x
-
fb8bf7e: Allow multiple Astro servers to be running simultaneously by choosing random ports if the defaults are taken.
-
294a656: Adds support for global style blocks via
<style global>
Be careful with this escape hatch! This is best reserved for uses like importing styling libraries like Tailwind, or changing global CSS variables.
-
8f4562a: Improve slot support, adding support for named slots and fallback content within
slot
elements.See the new Slots documentation for more information.
-
4a601ad: Restores the ability to use Fragment in astro components
-
0e761b9: Add ability to specify hostname in devOptions
-
164489f: Fix for
false
being rendered in conditionals -
e3182c7: Adds a missing dependency
-
af935c1: Fix error when no renderers are passed
-
4726e34: Fixes cases where buildOptions.site is not respected
-
c82e6be: Fix unfound ./snowpack-plugin-jsx.cjs error
-
007c220: Remove custom Astro.fetchContent() glob implementation, use
import.meta.globEager
internally instead. -
9859f53: Correcting typo in ReadMe
-
b85e68a: Fixes case where custom elements are not handled within JSX expressions
-
Updated dependencies [a7e6666]
-
Updated dependencies [294a656]
-
Updated dependencies [bd18e14]
-
Updated dependencies [bd18e14]
-
Updated dependencies [1f79144]
-
Updated dependencies [b85e68a]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- e89a99f: This includes the props passed to a hydration component when generating the hash/id. This prevents multiple instances of the same component with differing props to be treated as the same component when hydrated by Astro.
- b8af49f: Added sass support
- 4726e34: Fixes cases where buildOptions.site is not respected
- Updated dependencies [1f79144]
- @astrojs/[email protected]
-
294a656: Adds support for global style blocks via
<style global>
Be careful with this escape hatch! This is best reserved for uses like importing styling libraries like Tailwind, or changing global CSS variables.
-
164489f: Fix for
false
being rendered in conditionals -
af935c1: Fix error when no renderers are passed
-
Updated dependencies [294a656]
- @astrojs/[email protected]
- c82e6be: Fix unfound ./snowpack-plugin-jsx.cjs error
- Add support for the new JSX transform for React 17 and Preact.
- Add support for Solid when using the new
@astrojs/renderer-solid
package.
- 4a601ad: Restores the ability to use Fragment in astro components
- Updated dependencies [bd18e14]
- Updated dependencies [bd18e14]
- @astrojs/[email protected]
- @astrojs/[email protected]
-
f67e8f5: New Collections API (createCollection)
BREAKING CHANGE: The expected return format from createCollection() has been changed. Visit https://docs.astro.build/core-concepts/collections to learn the new API.
This feature was implemented with backwards-compatible deprecation warnings, to help you find and update pages that are using the legacy API.
-
40c882a: Fix url to find page with "index" at the end file name
- a7e6666: compile javascript to target Node v12.x
- fb8bf7e: Allow multiple Astro servers to be running simultaneously by choosing random ports if the defaults are taken.
- 0e761b9: Add ability to specify hostname in devOptions
- 007c220: Remove custom Astro.fetchContent() glob implementation, use
import.meta.globEager
internally instead. - b85e68a: Fixes case where custom elements are not handled within JSX expressions
- Updated dependencies [a7e6666]
- Updated dependencies [b85e68a]
- @astrojs/[email protected]
- e3182c7: Adds a missing dependency
-
0340b0f: Adds support for the client:media hydrator
The new
client:media
hydrator allows you to define a component that should only be loaded when a media query matches. An example usage:--- import Sidebar from '../components/Sidebar.jsx'; --- <Sidebar client:media="(max-width: 700px)" />
This allows you to define components which, for example, only run on mobile devices. A common example is a slide-in sidebar that is needed to add navigation to a mobile app, but is never displayed in desktop view.
Since Astro components can have expressions, you can move common media queries to a module for sharing. For example here are defining:
media.js
export const MOBILE = '(max-width: 700px)';
And then you can reference this in your page:
index.astro
import Sidebar from '../components/Sidebar.jsx'; import { MOBILE } from '../media.js'; ---(<Sidebar client:media={MOBILE} />);
-
8f4562a: Improve slot support, adding support for named slots and fallback content within
slot
elements.See the new Slots documentation for more information.
-
9859f53: Correcting typo in ReadMe
- [release/0.17] Update compile target to better support Node v12.
-
1b73f95: Only show the buildOptions.site notice if not already set
-
fb78b76: Improve error handling for unsupported Node versions
-
d93f768: Add support for components defined in Frontmatter. Previously, the following code would throw an error. Now it is officially supported!
--- const { level = 1 } = Astro.props; const Element = `h${level}`; --- <Element>Hello world!</Element>
-
1e01251: Fixes bug with React renderer that would not hydrate correctly
-
42a6ace: Add support for components defined in Frontmatter. Previously, the following code would throw an error. Now it is officially supported!
--- const { level = 1 } = Astro.props; const Element = `h${level}`; --- <Element>Hello world!</Element>
-
Updated dependencies [1e01251]
- @astrojs/[email protected]
-
0a7b6de: ## Adds directive syntax for component hydration
This change updates the syntax for partial hydration from
<Button:load />
to<Button client:load />
.Why?
Partial hydration is about to get super powers! This clears the way for more dynamic partial hydration, i.e.
<MobileMenu client:media="(max-width: 40em)" />
.How to upgrade
Just update
:load
,:idle
, and:visible
to match theclient:load
format, thats it! Don't worry, the original syntax is still supported but it's recommended to future-proof your project by updating to the newer syntax.
- 5d1ff62: Hotfix for snowpack regression
- 20b4a60: Bugfix: do not override user
alias
passed into snowpack config - 42a1fd7: Add command line flag
--silent
to astro to set no output.
- 2d3e369: Fix for using the snowpack polyfillNode option
-
d396943: Add support for
remark
andrehype
plugins for both.md
pages and.astro
pages using the<Markdown>
component.For example, the
astro.config.mjs
could be updated to include the following. Read the Markdown documentation for more information.Note Enabling custom
remarkPlugins
orrehypePlugins
removes Astro's built-in support for GitHub-flavored Markdown support, Footnotes syntax, Smartypants. You must explicitly add these plugins to yourastro.config.mjs
file, if desired.export default { markdownOptions: { remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], }, };
- Updated dependencies [d396943]
- Updated dependencies [f83407e]
- @astrojs/[email protected]
-
7b4c97c: Adds support for
hydrationPolyfills
in renderersRenderers can not specify polyfills that must run before the component code runs for hydration:
export default { name: '@matthewp/my-renderer', server: './server.js', client: './client.js', hydrationPolyfills: ['./my-polyfill.js'], };
These will still wait for hydration to occur, but will run before the component script does.
- 6a660f1: Adds low-level custom element support that renderers can use to enable server side rendering. This will be used in renderers such as a Lit renderer.
- Updated dependencies [6a660f1]
- @astrojs/[email protected]
- 17579c2: Improves the error message when attempting to use
window
in a component.
- 1e735bb: Allows passing in a class to a child component which will be scoped
- e28d5cb: Improve error handling within
.astro
files (#526) - aa86057: Updates collections to match URLs by exact template filename
- f721275: Fix issue where Markdown could close it's parent element early (#494)
- 8865158: Fixes postcss bug with the 'from' property
-
a136c85: This is a breaking change!
Astro props are now accessed from the
Astro.props
global. This change is meant to make prop definitions more ergonomic, leaning into JavaScript patterns you already know (destructuring and defaults). Astro components previously used a prop syntax borrowed from Svelte, but it became clear that this was pretty confusing for most users.--- + const { text = 'Hello world!' } = Astro.props; - export let text = 'Hello world!'; --- <div>{text}</div>
Read more about the
.astro
syntax
Astro frontmatter scripts are TypeScript! Because of this, we can leverage TypeScript types to define the shape of your props.
--- export interface Props { text?: string; } const { text = 'Hello world!' } = Astro.props as Props; ---
Note Casting
Astro.props as Props
is a temporary workaround. We expect our Language Server to handle this automatically soon!One of the great things about this change is that it's straight-forward to access any props. Just use
...props
!--- export interface Props { text?: string; [attr: string]: unknown; } const { text = 'Hello world!', ...props } = Astro.props as Props; ---
We considered building prop validation into Astro, but decided to leave that implementation up to you! This way, you can use any set of tools you like.
--- const { text = 'Hello world!' } = Astro.props; if (typeof text !== 'string') throw new Error(`Expected "text" to be of type "string" but recieved "${typeof string}"!`); ---
- 4cd84c6: #528 Removes unused trapWarn function
- feb9a31: Fixes livereload on static pages
- 47ac2cc: Fix #521, allowing
{...spread}
props to work again - 5629349: Bugfix: PostCSS errors in internal Snowpack PostCSS plugin
- Updated dependencies [21dc28c]
- Updated dependencies [47ac2cc]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 3f3e4f1: Allow
pageSize: Infinity
when creating a collection - 44f429a: Allow node: prefix to load builtins
- 09b5779: Removes mounting the project folder and adds a
src
root option
Rolling back to 0.13.10 to prevent a regression in the dev server output.
- 6573bea: Fixed README header aspect ratio
- 2671b6f: Fix 472 by not injecting
astro-*
scoped class unless it is actually used - b547892: Makes providing a head element on pages optional
- b547892: Allows astro documents to omit the head element
- 0abd251: Allows renderers to provide knownEntrypoint config values
- Updated dependencies [0abd251]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 233fbcd: Fix race condition caused by parallel build
- Updated dependencies [7f8d586]
- @astrojs/[email protected]
- 3ada25d: Pass configured Tailwind config file to the tailwindcss plugin
- f9f2da4: Add repository key to all package.json
- Updated dependencies [f9f2da4]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 251b0b5: Less verbose HMR script
- 54c291e: Fix <script type="module"> resolution
- 272769d: Improve asset resolution
- 490f2be: Add support for Fragments with
<>
and</>
syntax - Updated dependencies [490f2be]
- @astrojs/[email protected]
- Updated dependencies [9d4a40f]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 016833a: Honors users HMR settings
- 73a43d9: Prevent dev from locking up on empty selectors
- 9f51e2d: Fix issue with arrow components in Preact/React
- 2d85409: Fixes serialization of boolean attributes
- e0989c6: Fix scoped CSS selector when class contains a colon
- 42dee79: Allows doctype to be written with any casing
- ab2972b: Update package.json engines for esm support
- Updated dependencies [ab2972b]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- c374a54: Bugfix: createCollection() API can be used without fetchContent()
- 61b5590: Pass "site" config to Snowpack as "baseUrl"
- ce93361: Set the minimum Node version in the engines field
- 1bab906: Removes a second instance of snowpack which degraded peformance
- 5fbc1cb: nit: ask user to modify devOptions.port when addr in use for dev
- 5cda571: Fix an issue with how files are watched during development
- 21b0c73: Removes some warnings that are internal to Astro
- f66fd1f: Fixes regression caused by attempting to prebuild an internal dep
- f6ef53b: Fixed a bug where recursive markdown was not working properly
- 5a871f3: Fixes logging to default to the info level
- f4a747f: improve build output
- 522c873: Fixes bug where astro build would fail when trying to log
- b1364af: Updates logging to display messages from Snowpack
- cc532cd: Properly resolve
tailwindcss
depedency if using Tailwind - Updated dependencies [b1364af]
- @astrojs/[email protected]
- 0d6afae: Fixes a few small bugs with the
Markdown
component when there are multiple instances on the same page - 1d930ff: Adds
--verbose
and--reload
flags to theastro
CLI.
- fe6a985: Fixes resolution when esinstall installs Markdown and Prism components
- 50e6f49: Fixes issues with using astro via the create script
- Updated dependencies [50e6f49]
- @astrojs/[email protected]
- Updated dependencies [6de740d]
-
8ff7998: Enable Snowpack's built-in HMR support to enable seamless live updates while editing.
-
ffb6380: Support for dynamic Markdown through the content attribute.
-
8ff7998: Enabled Snowpack's built-in HMR engine for Astro pages
-
643c880: This is a breaking change
Updated the rendering pipeline for
astro
to truly support any framework.For the vast majority of use cases,
astro
should just work out of the box. Astro now depends on@astrojs/renderer-preact
,@astrojs/renderer-react
,@astrojs/renderer-svelte
, and@astrojs/renderer-vue
, rather than these being built into the core library. This opens the door for anyone to contribute additional renderers for Astro to support their favorite framework, as well as the ability for users to control which renderers should be used.Features
- Expose a pluggable interface for controlling server-side rendering and client-side hydration
- Allows components from different frameworks to be nested within each other.
Note:
svelte
currently does support non-destructive hydration, so components from other frameworks cannot currently be nested inside of a Svelte component. See sveltejs/svelte#4308.
Breaking Changes
- To improve compiler performance, improve framework support, and minimize JS payloads, any children passed to hydrated components are automatically wrapped with an
<astro-fragment>
element.
-
3d20623: Fixed a bug where Astro did not conform to JSX Expressions'
&&
syntax.Also fixed a bug where
<span data-attr="" />
would render as<span data-attr="undefined" />
. -
46871d2: Fixed bug where a class attribute was added to the doctype
-
c9d833e: Fixed a number of bugs and re-enabled the
@astrojs/renderer-vue
renderer -
ce30bb0: Temporarily disable
@astrojs/renderer-vue
while we investigate an issue with installation -
addd67d: Rename
astroConfig
topages
in config. Docs updated. -
d2330a5: Improve error display for missing local files
-
Updated dependencies [643c880]
-
Updated dependencies [d2330a5]
-
Updated dependencies [c9d833e]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- [email protected]
- ce30bb0: Temporarily disable
@astrojs/renderer-vue
while we investigate an issue with installation
-
8ff7998: Enable Snowpack's built-in HMR support to enable seamless live updates while editing.
-
8ff7998: Enabled Snowpack's built-in HMR engine for Astro pages
-
643c880: This is a breaking change
Updated the rendering pipeline for
astro
to truly support any framework.For the vast majority of use cases,
astro
should just work out of the box. Astro now depends on@astrojs/renderer-preact
,@astrojs/renderer-react
,@astrojs/renderer-svelte
, and@astrojs/renderer-vue
, rather than these being built into the core library. This opens the door for anyone to contribute additional renderers for Astro to support their favorite framework, as well as the ability for users to control which renderers should be used.Features
- Expose a pluggable interface for controlling server-side rendering and client-side hydration
- Allows components from different frameworks to be nested within each other.
Note:
svelte
currently does support non-destructive hydration, so components from other frameworks cannot currently be nested inside of a Svelte component. See sveltejs/svelte#4308.
Breaking Changes
- To improve compiler performance, improve framework support, and minimize JS payloads, any children passed to hydrated components are automatically wrapped with an
<astro-fragment>
element.
-
3d20623: Fixed a bug where Astro did not conform to JSX Expressions'
&&
syntax.Also fixed a bug where
<span data-attr="" />
would render as<span data-attr="undefined" />
. -
Updated dependencies [643c880]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- @astrojs/[email protected]
- 19e20f2: Add Tailwind JIT support for Astro
- c43ee95: Bugfix: CSS bundling randomizes order
- 9cdada0: Fixes a few edge case bugs with Astro's handling of Markdown content
- Updated dependencies [9cdada0]
astro
has been bumped to 0.10.0
to avoid conflicts with the previously published astro
package (which was graciously donated to us at v0.9.2
).
-
b3886c2: Enhanced Markdown support! Markdown processing has been moved from
micromark
toremark
to prepare Astro for user-providedremark
plugins in the future.This change also introduces a built-in
<Markdown>
component for embedding Markdown and any Astro-supported component format inside of.astro
files. Read more about Astro's Markdown support.
- 9d092b5: Bugfix: Windows collection API path bug
- Updated dependencies [b3886c2]
- 7184149: Added canonical URL and site globals for .astro files
- b81abd5: Add CSS bundling
- 7b55d3d: chore: Remove non-null assertions
- 000464b: Fix bug when building Svelte components
- 95b1733: Fix: wait for async operation to finish
- e0a4f5f: Allow renaming for default import components
- 9feffda: Bugfix: fixes double
tags generated from markdown code blocks
- 87ab4c6: Bugfix: Scoped CSS with pseudoclasses and direct children selectors
- e0fc2ca: fix: build stuck on unhandled promise reject
- 3ad0aac: Fix
fetchContent
API bug for nested.md
files
- d924fcb: Fix issue with Prism component missing dependency
- Updated dependencies [d924fcb]