Process CSS in Eleventy (11ty) with LightningCSS to minify, prefix, and add future CSS support.
The Eleventy Plugin: LightningCSS is a powerful tool for web developers using the Eleventy static site generator. This plugin enhances the CSS processing capabilities of Eleventy by integrating LightningCSS, allowing users to minify, prefix, and support modern CSS features. With features that respect your existing browserslist configuration, this plugin ensures that your stylesheets are optimized for both performance and compatibility across various browser versions.
Notably, this plugin requires Eleventy version 2, making it essential to consider upgrade paths if you are integrating it into an existing project. For those seeking Sass support as well, an additional plugin is available. LightningCSS not only simplifies your CSS workflow but also embraces future CSS syntax, enabling developers to leverage contemporary web standards effortlessly.
@import syntax for better organization and modularization, preventing unwanted separate stylesheets in the final build.