A Rollup plugin for building component libraries with tree-shakeable, per-component CSS. Version 2.5.0 (stable). It converts CSS and preprocessor files (SASS/SCSS, Less, Stylus) into CSS modules, generating a separate CSS file per component with scoped class names. Unlike single CSS file bundling (bloat) or CSS-in-JS (runtime overhead), this plugin outputs plain CSS with zero runtime cost and automatic scoping. Works with preserveModules and code splitting. ESM-only, requires Node >=16. Ships TypeScript types.
npm install rollup-plugin-lib-styleVerified import paths — ran on the pinned version, not inferred.
Shows minimal Rollup config with preserveModules, CSS module usage, and plugin setup.
Ensure Rollup's output does not include the temporary .css.js files in final distribution (they are typically removed by build cleanup or ignored by .npmignore).
Update Node to >=16.
Use import syntax in your Rollup config or run Node with --experimental-require-module.
Update to 2.x and use named export { libStylePlugin } or default export.Replace require('rollup-plugin-lib-style') with import { libStylePlugin } from 'rollup-plugin-lib-style'.Verify you are using the named export: import { libStylePlugin } from 'rollup-plugin-lib-style'.Upgrade Node to 16 or higher.
No dependency data recorded yet.