I wanted to share a new Elixir package that I’ve built and open-sourced, lightning_css. I wanted to use globs to resolve and bundle CSS files, and I noticed that ESBuild, the default build tool that Phoenix ships with, doesn’t support that for CSS. Luckily, Lightning CSS does, and it ships as a binary that’s easy to pull and use in the same way the ESBuild Elixir package does. Therefore, I went ahead and built it.
Please, give it a try and let me know if you encounter any issues or have ideas for how to improve it. The README contains instructions for how to integrate it into a Phoenix project. I’d also recommend checking out Lightning CSS’s documentation, which goes into detail talking about other CSS-processing capabilities, which I don’t plan to use, but that you might find useful.
Happy Elixir coding!