websharks/css-minifier
A PHP CSS minifier that strips whitespace, comments, and redundant syntax to shrink stylesheets for faster page loads. Simple API for minifying CSS strings or files, usable in Laravel or any standalone PHP project.
Consider it only when all or most of these are true:
Look elsewhere when:
Executive summary: This is a tiny, old CSS minifier with very low adoption and a GPL-3.0 license. It may reduce CSS payload in legacy PHP environments, but it is not a strategic or low-risk choice for new Laravel products. The better product decision is to standardize on maintained build-time asset tooling and use this package only as a constrained legacy fallback.
For engineering: Treat it as an unsupported legacy utility. If adopted, isolate it behind an internal minifier interface, cache all output, add tests for modern CSS, verify PHP compatibility, and document the GPL obligations. Do not put it on a hot request path without caching. For new work, use Vite/CSSNano/Lightning CSS instead.
Recommendation: Do not adopt for new Laravel products. Consider only for legacy, GPL-compatible, low-risk maintenance scenarios where no modern asset pipeline exists and the dependency can be forked or contained.
How can I help you explore Laravel packages today?