Question: Refactoring + Simplicity + Co maintainer ^^ (original) (raw)
Hi ;) i lately had also the need for an esbuild css modules plugin for a project which also uses css modules composes: className from "./file.module.css"
I tried all existing css modules plugins but they wouldnt work for this case - as post-css-modules has a (sorry) horrible api.
After countless hours i found parcels lightningcss which worked like a charm and has a super nice api.
So i created a fully functioning, simple and readable css modules plugin with only ~100 lines of code.
You can see my implementation here: https://github.com/neos/neos-ui/blob/a0683ed157699042aa269ea0819977efafb5be46/cssModules.js (inlined in the bespoken project)
The reason why im reaching out to you is, that yours is the only esbuild css modules plugin of around 10 others which uses lightningcss as implementation. So i though creating my own css modules plugin (with the above implementation), to have 11 competing plugins, would not be what open source is about - instead i want to ask you if we want to improve your codebase together?
Mainly im thinking about:
- make the code easier to maintain / reduce complexity
- remove the v1 version or extract it into an own package
* that way we have less dependencies
* less code to maintain here
* no confusion with version switches (i dislike feature flags a bit ^^) - find out why your code is 4x that long (complex), and what can be optimized/refactored
- remove the v1 version or extract it into an own package
- implement css composes
- do we really need caching? The mentioned big project with around 100 css module files seems to build super smooth without any cache.
I would really like to chat (or maybe have call) with you about the above points and implement them together.
What do you say?