brisa-build / brisa

The Web Platform Framework.
https://brisa.build
MIT License
452 stars 12 forks source link

feat: compress CSS files to gz/br when `assetCompression=true` #504

Closed aralroca closed 1 month ago

aralroca commented 1 month ago

Fixes https://github.com/brisa-build/brisa/issues/156

It was the last point that was missing to finish the CSS issue. Since CSS files are handled differently than the rest of the public files that were already being compressed, these are not. With this change they are compressed when there is assetCompression=true in the configuration and it is production.

Serving them compressed is already being handled correctly, as it is part of the public folder inside the build.