A Rollup plugin (v4.5.5, stable) that bundles imported CSS files into a single asset rather than injecting them into the JavaScript bundle. Compared to rollup-plugin-postcss or rollup-plugin-styles, it is minimal—no CSS preprocessor support—and guarantees import order. Released under MIT, maintained by thgh, with compatibility for Rollup 2, 3, and 4 (since v4.4.0).
npm install rollup-plugin-css-onlyVerified import paths — ran on the pinned version, not inferred.
Configures Rollup to bundle all imported CSS into a single 'bundle.css' asset, excluding minified files.
If you relied on writeFile, use the `output` option (a function or string) to define custom behavior.
Upgrade to 4.4.0 or later, or stay on Rollup 3.
Use rollup-plugin-postcss or add a separate preprocessor plugin before this one.
Use the `output` option to specify filename or custom logic.
Ensure you do not set output: false unless you intentionally want to suppress CSS output.
Set output.assetFileNames or pass an `output` option to the plugin (e.g., output: 'bundle.css').
Use `import css from 'rollup-plugin-css-only'` (default import).
Upgrade to rollup-plugin-css-only@4.4.0 or later.
For v4+, use the `output` option to control where and how CSS is emitted.