In this document, you will learn how to build a Solid application using Rsbuild.
You can use create-rsbuild
to create a project with Rsbuild + Solid. Just execute the following command:
Then select Solid
when prompted to "Select framework".
To compile Solid components, you need to register the Rsbuild Solid plugin. The plugin will automatically add the necessary configuration for Solid builds.
For example, register in rsbuild.config.ts
:
After running rsbuild build
to build the application, you will get a set of static assets in the dist
directory. These assets can be deployed to any platform or server.
Please note that the default output structure of Rsbuild may not be suitable for all platforms because different platforms have different requirements for the directory structure. You can refer to the Output Files section to modify the directory structure to meet the requirements of your deployment platform.
Additionally, if you need to preview the deployment artifacts locally, you can use the rsbuild preview command provided by Rsbuild CLI.