A Rollup plugin that uses Parcel's LightningCSS for CSS transformation and minification. Version 1.0.0, released recently. It integrates LightningCSS into Rollup's build pipeline, supporting CSS minification and source map generation via the `generateBundle` hook. Compared to other CSS plugins (e.g., rollup-plugin-postcss), it leverages LightningCSS's native performance and modern CSS features. Currently, CSS files are output at the same level as the entrypoint; output destination is not configurable.
npm install rollup-plugin-lightningcssVerified import paths — ran on the pinned version, not inferred.
Minifies CSS files using LightningCSS with Rollup, enabling source maps and specifying browserslist.
Use Rollup's assetFileNames option to control output paths if needed, or handle file movement post-build.
Use additional plugins (e.g., @rollup/plugin-styles) if you need CSS module support.
Set sourceMap: true in plugin options to enable source maps.
Use import syntax or set type: 'module' in package.json.
Use default import: import lightningcss from 'rollup-plugin-lightningcss'.
Review LightningCSS documentation and ensure options match the expected configuration.
No dependency data recorded yet.