diff --git a/.changeset/clean-server-component-hydration.md b/.changeset/clean-server-component-hydration.md new file mode 100644 index 0000000..7d3c0b6 --- /dev/null +++ b/.changeset/clean-server-component-hydration.md @@ -0,0 +1,5 @@ +--- +'vite-plugin-solid': patch +--- + +Prevent generated server-component hydration from shifting the `
` structure. The bootstrap now runs at the start of the existing hydration script instead of adding an unexpected first child to ``. diff --git a/examples/turnkey/test/run.mjs b/examples/turnkey/test/run.mjs index 91ffa56..471f6fd 100644 --- a/examples/turnkey/test/run.mjs +++ b/examples/turnkey/test/run.mjs @@ -1433,19 +1433,22 @@ async function runFramesChecks(mode, origin) { html.split(`${FRAMES_SECRET}-one`).length === 2, ); record(mode, 'document', 't=0 slot records shipped (sc:slot)', html.includes('sc:slot:')); - // Presence is not enough: the render plugin serializes a placeholder as - // `self._$SC.r(id)`, so the registry must be defined BEFORE the hydration - // data script runs. Anchoring the injection on `` put it after - //