Stylus is an Expressive, dynamic and robust CSS preprocessor. With Stylus plugins, you can use Stylus as the CSS preprocessor.
You can install the plugin using the following command:
You can register the plugin in the rsbuild.config.ts
file:
After installing the plugin, you can directly import *.styl
, *.stylus
, *.module.styl
or *.module.stylus
files into the code without adding other configs.
normalize.styl
:title.module.styl
:index.js
:If you need to customize the compilation behavior of Stylus, you can use the following configs.
-Type:
undefined
Options passed to Stylus, please refer to the Stylus documentation for specific usage.
boolean
Whether to generate source map.