Solid plugin
The Solid plugin provides support for Solid features. The plugin internally integrates babel-preset-solid.
The Solid plugin relies on Babel transpilation and requires an additional Babel plugin. At the same time, adding the Babel plugin will cause additional compilation overhead.
Quick start
Install plugin
Run the following command:
Register plugin
Register the plugin in Rsbuild config:
After registration, you can develop Solid directly.
Since the Solid JSX relies on Babel for compilation, you need to additionally add the Babel plugin.
Babel compilation will introduce extra overhead, in the example above, we use include to match .jsx and .tsx files, thereby reducing the performance cost brought by Babel.
Solid v2
Solid v2 support is currently in beta. To use Solid v2, install the beta version of @rsbuild/plugin-solid:
Resolution behavior
The Solid plugin adds solid to Rsbuild's resolve.conditionNames. This allows package exports to resolve Solid-specific entries when they are available.
In development mode, the plugin also adds development to resolve Solid's development runtime and enables development-only compiler transforms. You can disable both behaviors with dev: false.
If you configure resolve.conditionNames, the plugin preserves your configured values and prepends these Solid conditions.
Options
To customize the compilation behavior of Solid, use the following options.
dev
Whether to enable Solid's development runtime and development-only compiler transforms. Set it to false to disable both behaviors in development mode, or set it to true to enable them in production mode.
If solid.dev is explicitly configured, it overrides the dev setting for compiler transforms without affecting runtime resolution.
- Type:
boolean - Default:
truein development mode,falsein production mode - Example:
refresh.disabled
Whether to disable Solid Refresh for HMR in development mode. This only controls the refresh transform and does not disable Rsbuild HMR.
- Type:
boolean - Default:
false - Example:
refresh.granular
Whether to emit per-component metadata so edits only remount components whose code changed.
- Type:
boolean - Default:
true - Version:
>= 2.0.0 - Example:
ssr
Whether to generate output for Solid SSR. When enabled, the plugin uses generate: 'ssr' and hydratable: true for Node.js targets, and uses generate: 'dom' and hydratable: true for other targets.
Values in solid will override these defaults.
- Type:
boolean - Default:
false - Example:
solid
These options are passed to babel-preset-solid. For details, see the babel-preset-solid documentation.
- Type:
SolidPresetOptions - Default:
{} - Example:
solidPresetOptionsis a deprecated alias forsolid. Usesolidinstead. If both options are set,solidtakes precedence.

