Stylus plugin
Stylus is an Expressive, dynamic and robust CSS preprocessor. With Stylus plugins, you can use Stylus as the CSS preprocessor.
Quick start
Install plugin
You can install the plugin using the following command:
Register plugin
You can register the plugin in the rsbuild.config.ts file:
rsbuild.config.ts
Example
After registering the plugin, you can import *.styl, *.stylus, *.module.styl or *.module.stylus files into the code without adding other configs.
normalize.styl:
title.module.styl:
index.js:
Options
To customize the compilation behavior of Stylus, use the following options.
stylusOptions
-Type:
- Default:
undefined
These options are passed to Stylus. For details, see the Stylus documentation.
sourceMap
- Type:
boolean - Default: the same as output.sourceMap.css
Whether to generate source map.

