astro@2.10.0
版本发布时间: 2023-08-03 22:57:06
withastro/astro最新发布版本:astro@5.0.0-beta.2(2024-09-24 17:12:05)
Minor Changes
-
#7861
41afb8405
Thanks @matthewp! - Persistent DOM and Islands in Experimental View TransitionsWith
viewTransitions: true
enabled in your Astro config's experimental section, pages using the<ViewTransition />
routing component can now access a newtransition:persist
directive.With this directive, you can keep the state of DOM elements and islands on the old page when transitioning to the new page.
For example, to keep a video playing across page navigation, add
transition:persist
to the element:<video controls="" autoplay="" transition:persist> <source src="https://ia804502.us.archive.org/33/items/GoldenGa1939_3/GoldenGa1939_3_512kb.mp4" type="video/mp4" /> </video>
This
<video>
element, with its current state, will be moved over to the next page (if the video also exists on that page).Likewise, this feature works with any client-side framework component island. In this example, a counter's state is preserved and moved to the new page:
<Counter count={5} client:load transition:persist />
See our View Transitions Guide to learn more on usage.
Patch Changes
-
#7821
c00b6f0c4
Thanks @ottomated! - Fixes an issue that prevents importing'astro/app'
-
#7917
1f0ee494a
Thanks @bluwy! - Prevent integration hooks from re-triggering if the server restarts on config change, but the config fails to load. -
#7901
00cb28f49
Thanks @bluwy! - Improve sourcemap generation and performance -
#7911
c264be349
Thanks @martrapp! - fix for #7882 by setting state in page navigation (view transitions) -
#7909
e1e958a75
Thanks @tonydangblog! - Fix: ignore.json
files nested in subdirectories within content collection directories starting with an_
underscore.