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.
You can install the plugin using the following command:
You can register the plugin in the rsbuild.config.ts
file:
After registering the plugin, you can directly develop Solid.
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.
If you need to customize the compilation behavior of Solid, you can use the following configs.
Options passed to babel-preset-solid
, please refer to the babel-preset-solid documentation for detailed usage.
SolidPresetOptions
{}