A Rollup plugin that bundles imported CSS files into a separate CSS asset file, respecting Rollup's asset handling and sourcemap options. Version 1.0.2 is the current stable release; the plugin is in maintenance mode with no recent updates. It differentiates from other CSS plugins by focusing on simplicity: no post-processing, no JS injection, just emitting CSS as a Rollup asset with hashing and path customization. Requires Rollup >=1.19.0.
npm install rollup-plugin-css-assetVerified import paths — ran on the pinned version, not inferred.
Basic Rollup configuration using rollup-plugin-css-asset to bundle CSS into a separate asset file with hashing and sourcemaps.
Combine with postcss plugin (e.g., rollup-plugin-postcss) if CSS processing is needed.
Ensure all CSS files are imported in your entry points or dependencies.
Use code splitting or multiple plugin instances if separate CSS outputs are required.
Upgrade Rollup to >=1.19.0.
Run: npm install --save-dev rollup-plugin-css-asset
Change to: import css from 'rollup-plugin-css-asset'
Add import './styles.css' in your entry file.
No dependency data recorded yet.