Bazel rules for https://github.com/parcel-bundler/lightningcss, an extremely fast CSS parser, transformer, and minifier written in Rust.
This project is being developed, and does not yet have an official release. For now, feel free to click "Watch" on GitHub to be notified when it is released.
Core functionality:
- CSS modules: module-scoped class names (
composesis not supported) - browserslist
- Minification
- Source maps
- Compiling multiple sources (
--output-dir) - Dependencies and bundling:
@import,composes(CSS modules), custom resolvers - Custom transforms
Supporting functionality:
- JS class map generation
- Given a file like
MyComponent.module.css, generatesMyComponent.module.css.jscontaining a map with classes that can be imported and referenced from JS or TS code. - This is done using a small, fast tool written in C++ that parses the JSON output from lightningcss and directly generates a JS file.
- Given a file like
See examples directory.
TODO: publish to Bazel Central Registry.