Skip to content

fix(svelte): detect Svelte components with renamed renderer prop#14433

Merged
ascorbic merged 1 commit into
mainfrom
svelte-renderer
Sep 24, 2025
Merged

fix(svelte): detect Svelte components with renamed renderer prop#14433
ascorbic merged 1 commit into
mainfrom
svelte-renderer

Conversation

@ascorbic

Copy link
Copy Markdown
Contributor

Changes

Svelte 5.39.1 changed the name of the $$payload prop. We were using this as a heuristic to detect if a component was svelte, meaning that we were no longer detecting it. This PR checks for both.

Testing

Updated fixtures.

Docs

@changeset-bot

changeset-bot Bot commented Sep 24, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b6627dd

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: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Sep 24, 2025
@ascorbic
ascorbic merged commit 9cc8f21 into main Sep 24, 2025
20 checks passed
@ascorbic
ascorbic deleted the svelte-renderer branch September 24, 2025 14:11
@astrobot-houston astrobot-houston mentioned this pull request Sep 24, 2025
matthewp pushed a commit that referenced this pull request Jul 2, 2026
…rer` prop (#17270)

Svelte renamed the internal renderer prop from `$$payload` to `$$renderer`
in Svelte 5.x (#14433 fixed the Svelte renderer check). The Solid renderer
copies that check to exclude Svelte components from being claimed as Solid,
but was never updated to cover the new prop name.

Projects that mix `@astrojs/solid-js` with `@astrojs/svelte` and use a
newer Svelte 5 release now compile components with `$$renderer`, which the
Solid renderer doesn't recognise, causing it to render those Svelte components
as empty strings instead of passing them to the Svelte renderer.

Fixes by mirroring the same two-prop check that the Svelte renderer already uses.
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: svelte Related to Svelte (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants