diff --git a/.changeset/chilled-elephants-develop.md b/.changeset/chilled-elephants-develop.md new file mode 100644 index 000000000000..06c1da4520af --- /dev/null +++ b/.changeset/chilled-elephants-develop.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds an `astro:beforeload` event for the dark mode use-case diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 2df794679ea4..33cad86a2d8c 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -13,6 +13,7 @@ const { fallback = 'animate' } = Astro.props as Props; + diff --git a/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro b/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro index e4dc54015c4c..9d94681cda57 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/components/Layout.astro @@ -1,5 +1,6 @@ --- import { ViewTransitions } from 'astro:transitions'; +import DarkMode from './DarkMode.astro'; interface Props { link?: string; @@ -12,6 +13,7 @@ const { link } = Astro.props as Props;