Improving lightningcss maintenance - please help! #1241
Replies: 4 comments
-
|
Hi @devongovett, Thank you for opening this discussion. I'd love to help with Lightning CSS maintenance. I've landed one PR on this repo so far (#929, shipped in v1.29.2), and I've been actively contributing across the broader frontend toolchain ecosystem — including Bun, which you mentioned ships a port of Lightning CSS. I'd be glad to bring that focus here on a regular basis. Areas I'd like to focus on:
📋 Background & relevant contributions
🎯 Alignment with project philosophyI align well with the philosophy you outlined — particularly:
I prefer small, well-scoped, understandable changes. I'll keep submitting PRs to demonstrate the regular involvement you're looking for, and I'm happy to chat further on Discord in the Thanks again for being open about needing help. Lightning CSS is foundational infrastructure now, and I'd be honored to help carry some of the load. Best, |
Beta Was this translation helpful? Give feedback.
-
|
IMHO, I think we need more automations to help contributors contribute with confidence. In my experience, the automated regression testing was the most important thing. The regression testing need to be stable, and should not require too much time for the contributor side. I think codspeed is the best (and maybe only) tool for performance part, so I created #1243 |
Beta Was this translation helpful? Give feedback.
-
|
Regarding the publish automation pipeline, how do you think about using changeset in a customized way, like https://raw.githubusercontent.com/swc-project/swc/68af779eff35120407a7147b3b60700c54db243c/.changeset/rewrite-this-destructuring-defaults.md ? We can mark a PR as |
Beta Was this translation helpful? Give feedback.
-
|
Hi @devongovett half an year ago I opened #1113 trying to migrate from napi-rs v2 to v3. Maybe this can be a start point for "automate updating the TypeScript types"? Originally I wanted to implement the glue layer by reverse engineering from the type definitions, so that later napi-cli can generate the type definitions from the Rust code. But I soon gave up because I was new to both lightningcss and napi-rs. So I focused only on migrating the implementations, leaving type definitions untouched. I had tested on varies platforms with this CI.yml, and noticed some exceptions, for example floating numbers might be slightly different on Windows, wasm32 drops error filename and location. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Lightning CSS usage has skyrocketed in the last year. It is now used in almost every major modern build tool, including Next.js, Vite, Rspack, Tailwind, Parcel, Bun (a port), etc. npm downloads have increased to over 70 million per week, and that does not include Next.js or Rspack, which embed the Rust crate directly. So the real number is probably over 100 million.
This is really incredible, but to be honest, I could use some help with maintenance. I appreciate sponsorships, but unfortunately this does not magically create more time for me to work on it. CSS is evolving very quickly and it's difficult to keep up with all the new features as a solo dev. I'm sorry if my slowness has affected you.
Now that Lightning CSS is a core ecosystem dependency, I need to find a way to improve this. I am reaching out to each of the major tools using Lightning CSS to bring on additional maintainers. Hopefully we can get a good core team established and speed up the process a bit.
If you're interested in helping, please reach out (here or on Discord in the lightningcss channel). I'll be inviting people how have submitted a few good pull requests and generally show an interest in helping on a somewhat regular basis. We have some funds in Parcel's OpenCollective that we can also distribute at my discretion.
What needs to be done
An incomplete list of the main work streams:
scripts/build-prefixes.jsscript before each release to update the browser support data. Would be great if this was automated.scripts/build-ast.jsbuildsast.d.tsfrom the Rust source. This currently must be done manually before each release.cssparserandselectorscrates from Servo need updating periodically.Project philosophy
A few things off the top of my head for maintainers to keep in mind.
errorRecoverymode, as long as they are valid CSS syntax. Other syntax extensions should not be supported because this greatly complicates the tokenizer/parser. These should be processed by external tools before the output is passed to Lightning CSS.Beta Was this translation helpful? Give feedback.
All reactions