Universal Rollup plugin for processing CSS, PostCSS, Sass, Less, Stylus, and CSS Modules with asset handling and URL resolving. Current stable version is 2.0.0 (released 2025-02-09), with a new major version that resets stylus dependency. Key differentiators: supports multiple preprocessors, CSS Modules type exports, inject/extract/emit modes, and automatic PostCSS config loading. Actively maintained, with recent updates focusing on dependency upgrades and CI improvements.
npm install rollup-plugin-stylerVerified import paths — ran on the pinned version, not inferred.
Rollup config with rollup-plugin-styler in extract mode with Sass support.
Update stylus usage to match the new version.
Use 'rollup-plugin-styler' instead of 'rollup-styles'.
Switch to 'inject' or 'extract' mode.
Set mode: 'extract' in plugin options.
Use `import { css } from './style.css'` for CSS string.npm install -D rollup-plugin-styler and update imports.
npm install -D postcss
Use `import styles from 'rollup-plugin-styler'` instead of `require`.