Skip to content

Conversation

@ascorbic
Copy link
Contributor

Changes

Unlike other frameworks, by default, preact and svelte don't replace the target element content when rendering (via render or mount) respectively. This caused fallback content to remain when using client:only. This PR empties the target element before rendering.

Fixes #12513

Testing

Added e2e tests

Docs

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2025

🦋 Changeset detected

Latest commit: d324f3c

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: svelte Related to Svelte (scope) pkg: preact Related to Preact (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Mar 20, 2025
@ascorbic ascorbic force-pushed the clinet-only-fallback branch from dd814ff to d324f3c Compare March 20, 2025 11:05
@ascorbic ascorbic merged commit ecadb6b into main Mar 20, 2025
14 checks passed
@ascorbic ascorbic deleted the clinet-only-fallback branch March 20, 2025 11:43
@astrobot-houston astrobot-houston mentioned this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: preact Related to Preact (scope) pkg: svelte Related to Svelte (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client:only Svelte 4 or 5 component does not remove fallback slot after it loaded

3 participants