paularmstrong / build-tracker

A set of tools to track the size of your build artifacts over time.
https://buildtracker.dev
MIT License
439 stars 27 forks source link

Suggestion: make Brotli quality level configurable #232

Open OliverJAsh opened 3 years ago

OliverJAsh commented 3 years ago

Problem

At the moment the Brotli size is calculated using max quality (11).

https://github.com/paularmstrong/build-tracker/blob/371e54ebf37f935a7efd1240894cdc0a45acf7ac/src/api-client/src/modules/readfile.ts#L34

https://github.com/erwinmombay/brotli-size/blob/6247b27b4c9c635cce5a6a781248fa0196208426/src/index.ts#L19

However, we are using quality 4 (for various reasons).

We would like the Brotli size in Build Tracker to match the size of our compressed assets in production.

Proposed solution

A setting to control the quality level that would be passed through to brotli-size.