https://github.com/bduffany/rules_lightningcss
Bazel rules for lightningcss
https://github.com/bduffany/rules_lightningcss
bazel bazel-rules css lightningcss
Last synced: about 1 month ago
JSON representation
Bazel rules for lightningcss
- Host: GitHub
- URL: https://github.com/bduffany/rules_lightningcss
- Owner: bduffany
- Created: 2024-09-22T21:25:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-18T05:25:36.000Z (about 1 year ago)
- Last Synced: 2025-07-18T01:17:19.960Z (11 months ago)
- Topics: bazel, bazel-rules, css, lightningcss
- Language: Starlark
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rules_lightningcss
Bazel rules for https://github.com/parcel-bundler/lightningcss, an
extremely fast CSS parser, transformer, and minifier written in Rust.
## Project status
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.
## Features
Core functionality:
- [x] **CSS modules**: module-scoped class names (`composes` is not supported)
- [x] **browserslist**
- [x] **Minification**
- [x] **Source maps**
- [ ] Compiling multiple sources (`--output-dir`)
- [ ] Dependencies and bundling: `@import`, `composes` (CSS modules), custom resolvers
- [ ] Custom transforms
Supporting functionality:
- [x] **JS class map generation**
- Given a file like `MyComponent.module.css`, generates
`MyComponent.module.css.js` containing 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.
## Usage
See examples directory.
TODO: publish to Bazel Central Registry.