A Rollup plugin (version 1.0.1, released Oct 2019) that compiles .styl/.stylus files to CSS using the Stylus preprocessor. It does not handle CSS output directly; instead, it must be paired with another plugin (e.g., rollup-plugin-css-porter, rollup-plugin-css-only, or rollup-plugin-postcss) to emit or inline the resulting CSS. The plugin is minimal, focusing solely on Stylus compilation, and relies on Stylus as a peer dependency. Compared to rollup-plugin-postcss (which supports multiple preprocessors), this plugin is Stylus-specific and lighter. Last updated in 2019, it is considered maintenance-only.
npm install rollup-plugin-stylus-compilerVerified import paths — ran on the pinned version, not inferred.
Shows minimal setup with rollup-plugin-css-porter to compile .styl and output CSS files.
Consider using rollup-plugin-postcss which supports Stylus via options: plugins: [postcss({ preprocessor: 'stylus' })].Install stylus: npm install --save-dev stylus
Add a CSS output plugin like rollup-plugin-css-porter, rollup-plugin-css-only, or rollup-plugin-postcss after stylus().
Use stylus() not stylus.
Use rollup-plugin-postcss or fork/update the plugin.
Ensure you use stylus() in your plugins array, not stylus.
Run: npm install --save-dev stylus
Verify the import path in your JavaScript file (e.g., import './style.styl').
Add stylus() to the plugins array in your Rollup config.