Plugin
Rsbuild provides a powerful plugin system that allows for user extension. Rspeedy leverages this plugin system directly.
Plugins written by developers can modify the default behavior of Rspeedy/Rsbuild and add various additional features, including but not limited to:
- Register lifecycle hooks
- Transform module source code
- Modify Rsbuild configuration
- Modify Rspack configuration
Find Plugins
Before finding plugin, you may want to check if the feature you want is already included in Rspeedy Configuration.
Official Plugins
The following official plugins are maintained by Lynx team.
- QR code Plugin: Use QR code with Rspeedy.
You can find the source code of all official plugins in lynx-stack.
Rsbuild Plugins
The following Rsbuild plugins can be used in Rspeedy.
- Sass Plugin: Use Sass as the CSS preprocessor.
- Less Plugin: Use Less as the CSS preprocessor.
- ESLint Plugin: Run ESLint checks during the compilation.
- Type Check Plugin: Run TypeScript type checker on a separate process.
- Image Compress Plugin: Compress the image assets.
- Typed CSS Modules Plugin: Generate TypeScript declaration file for CSS Modules.
- Tailwind CSS Plugin: Integration with Tailwind CSS V3.
Rspack/Webpack Plugins
The following Rspack/Webpack plugins can be used in Rspeedy.
Rspack/Webpack plugins should be placed in tools.rspack.plugins.
- BannerPlugin: Add a banner to the top or bottom of the output.
- EnvironmentPlugin: Use
process.envwith DefinePlugin. - ProvidePlugin: Automatically load modules instead of having to
importthem everywhere.
Write Plugins
If none of the existing ecosystem plugins meet your requirements, you might consider writing your own plugin.
Rsbuild Plugin API
See Rsbuild - Plugin Hooks for more details.
Rspack Plugin API
See Rspack - Compiler Hooks and Rspack - Compilation Hooks for more details.

