The Svelte plugin provides support for Svelte components (.svelte
files). The plugin internally integrates svelte-loader.
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 import *.svelte
files in your code.
If you need to customize the compilation behavior of Svelte, you can use the following configs.
Options passed to svelte-loader
, please refer to the svelte-loader documentation for detailed usage.
Object