Babel preset that transforms JSX specifically for Solid.js, enabling Solid's fine-grained reactivity. Current stable version is 1.9.12, with v2.0.0 in beta. Released infrequently, tied to Solid core releases. Key differentiator: it is the official preset maintained by the Solid team, handling Solid's unique JSX runtime and providing optimizations for server-side rendering and hydration. Compared to generic JSX presets, it automatically injects Solid's runtime imports and supports Solid's control flow components.
npm install babel-preset-solidVerified import paths — ran on the pinned version, not inferred.
Shows minimal Babel config to enable Solid JSX transformation and a simple counter component.
Update to babel-preset-solid@^2.0.0-beta.0 or later.
Remove any manual import of jsx/jsxDEV and rely on the Babel preset.
Use babel-preset-solid@^1.x for Solid 1.x projects.
Upgrade to @babel/core@^7.0.0.
npm install solid-js
Ensure babel-preset-solid is in your presets array and that Babel is configured correctly.
npm install --save-dev babel-preset-solid