You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Component is inserted after trailing static text in 2.0.0-rc.0 #3004
In Solid 2.0.0-rc.0, a component placed between static text nodes is inserted after the trailing text during client-side rendering.
import{render}from'@solidjs/web';constroot=document.querySelector('#root');if(!root){thrownewError('Root element not found');}functionFormat(props: {n: number}){return<datavalue={props.n}>{props.n.toFixed(2)}</data>;}functionTest(){return(<main><p>
(<Formatn={1000}/>)
</p></main>);}render(()=><Test/>,root);
Fixed upstream in the native compiler: ryansolid/dom-expressions@287875f6 (ships with the next @dom-expressions/compiler release; Solid picks it up on the version bump).
This was a Rust-compiler-only bug — the Babel transform was unaffected. For a dynamic slot followed by static content, the dom generate anchored the insert on the following template node's walk position. But when static text also precedes the slot, the two texts merge into one node during HTML parsing (<p>()), so the walk resolved to null and the runtime appended the component at the end of the parent — ()1000.00.
The compiler now mirrors Babel's wrappedByText rule: a slot boxed by text on both sides emits a dedicated <!> placeholder in the template (<p>(<!>)) and anchors the insert on it. The regression shape is pinned in the shared fixture both compilers compile, so output parity is enforced going forward.
Activity
fix(compiler): dedicated <!> marker for dynamic slots boxed by static…
ryansolid commentedon Aug 17, 2026
Fixed upstream in the native compiler: ryansolid/dom-expressions@287875f6 (ships with the next
@dom-expressions/compilerrelease; Solid picks it up on the version bump).This was a Rust-compiler-only bug — the Babel transform was unaffected. For a dynamic slot followed by static content, the dom generate anchored the insert on the following template node's walk position. But when static text also precedes the slot, the two texts merge into one node during HTML parsing (
<p>()), so the walk resolved tonulland the runtime appended the component at the end of the parent —()1000.00.The compiler now mirrors Babel's
wrappedByTextrule: a slot boxed by text on both sides emits a dedicated<!>placeholder in the template (<p>(<!>)) and anchors the insert on it. The regression shape is pinned in the shared fixture both compilers compile, so output parity is enforced going forward.unlock @dom-expressions/compiler from the exact 0.50.0-next.40 pin to…
chore(deps): update dependency @solidjs/vite-plugin to v3.0.0 (#92)
Update dependency @solidjs/vite-plugin to v3.0.0 (#52)