Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
[email protected]
Minor Changes
#7686
ec745d689
Thanks @matthewp! - Redirects configurationThis change moves the
redirects
configuration out of experimental. If you were previously using experimental redirects, remove the following experimental flag:If you have been waiting for stabilization before using redirects, now you can do so. Check out the docs on redirects to learn how to use this built-in feature.
#7707
3a6e42e19
Thanks @ottomated! - Improved hoisted script bundlingAstro's static analysis to determine which
<script>
tags to bundle together just got a little smarter!Astro create bundles that optimize script usage between pages and place them in the head of the document so that they are downloaded as early as possible. One limitation to Astro's existing approach has been that you could not dynamically use hoisted scripts. Each page received the same, all-inclusive bundle whether or not every script was needed on that page.
Now, Astro has improved the static analysis to take into account the actual imports used.
For example, Astro would previously bundle the
<script>
s from both the<Tab>
and<Accordian>
component for the following library that re-exports multiple components:@matthewp/my-astro-lib
Now, when an Astro page only uses a single component, Astro will send only the necessary script to the page. A page that only imports the
<Accordian>
component will not receive any<Tab>
component's scripts:You should now see more efficient performance with Astro now supporting this common library re-export pattern.
#7511
6a12fcecb
Thanks @matthewp! - Built-in View Transitions Support (experimental)Astro now supports view transitions through the new
<ViewTransitions />
component and thetransition:animate
(and associated) directives. View transitions are a great fit for content-oriented sites, and we see it as the best path to get the benefits of client-side routing (smoother transitions) without sacrificing the more simple mental model of MPAs.Enable support for view transitions in Astro 2.9 by adding the experimental flag to your config:
This enables you to use the new APIs added.
This is a component which acts as the router for transitions between pages. Add it to the
<head>
section of each individual page where transitions should occur in the client as you navigate away to another page, instead of causing a full page browser refresh. To enable support throughout your entire app, add the component in some common layout or component that targets the<head>
of every page.CommonHead.astro
With only this change, your app will now route completely in-client. You can then add transitions to individual elements using the
transition:animate
directive.Animations
Add
transition:animate
to any element to use Astro's built-in animations.In the above, Astro's
slide
animation will cause the<header>
element to slide out to the left, and then slide in from the right when you navigate away from the page.You can also customize these animations using any CSS animation properties, for example, by specifying a duration:
Continue learning
Check out the client-side routing docs to learn more.
Patch Changes
#7701
019b797bf
Thanks @bluwy! - Fix redirects map object-form value validation#7704
d78db48ac
Thanks @bluwy! - Fix absolute path handling when passingroot
,srcDir
,publicDir
,outDir
,cacheDir
,build.client
, andbuild.server
configs in Windows#7713
d088351f5
Thanks @natemoo-re! - Update warning whengetStaticPaths
is detected but a route is not prerendered.@astrojs/[email protected]
Patch Changes
77ffcc8f8
Thanks @natemoo-re! - Ensure nested 404 and 500 pages are always excluded