Skip to content

fix(@astrojs/solid-js): detect Svelte 5 components using the $$renderer prop#17270

Merged
matthewp merged 1 commit into
withastro:mainfrom
FrancoKaddour:fix/solid-svelte5-renderer-detection
Jul 2, 2026
Merged

fix(@astrojs/solid-js): detect Svelte 5 components using the $$renderer prop#17270
matthewp merged 1 commit into
withastro:mainfrom
FrancoKaddour:fix/solid-svelte5-renderer-detection

Conversation

@FrancoKaddour

Copy link
Copy Markdown
Contributor

Svelte 5 renamed its internal SSR prop from $$payload to $$renderer starting in a newer patch (tracked in fix(svelte): detect Svelte components with renamed renderer prop #14433, which updated the Svelte renderer). That PR correctly updated @astrojs/svelte, but the Solid renderer has its own copy of the same Svelte-exclusion check and was not updated at the same time.

Impact: users who have both @astrojs/solid-js and @astrojs/svelte installed, and whose Svelte version compiles components with $$renderer, will see those Svelte components rendered as empty strings by the Solid renderer instead of being handed off to the Svelte renderer.

Fix: mirror the same two-prop check already used in @astrojs/svelte:

if (componentStr.includes('$$payload') || componentStr.includes('$$renderer')) return false; 

…rer` prop

Svelte renamed the internal renderer prop from `$$payload` to `$$renderer`
in Svelte 5.x (withastro#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.
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e72980a

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

This PR includes changesets to release 13 packages
Name Type
@astrojs/solid-js Patch
@e2e/errors Patch
@e2e/solid-circular Patch
@e2e/solid-component Patch
@e2e/solid-recurse Patch
@e2e/view-transitions Patch
@test/astro-slots-nested Patch
@test/large-array-solid Patch
@test/postcss Patch
@test/slots-solid Patch
@test/solid-component Patch
@test/astro-cloudflare-server-island-prerender-framework Patch
@test/astro-cloudflare-with-solid-js Patch

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: solid Related to Solid (scope) pkg: integration Related to any renderer integration (scope) labels Jul 2, 2026
@matthewp
matthewp merged commit 0142964 into withastro:main Jul 2, 2026
24 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope) pkg: solid Related to Solid (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants