andresz1 / size-limit-action

Compare the real cost to run your JS app or lib to keep good performance in every pull request
ISC License
449 stars 83 forks source link

Is it possible to set a relative limit? #91

Open tniezurawski opened 2 years ago

tniezurawski commented 2 years ago

I'm wondering if I could fail the action if the file size increases e.g. by 10% or 100kB. Does such an option exist? If not, could you guide me on where to start? I can prepare the PR and documentation.

Use case: We're far away from the limit we've set but I'd like to discourage big changes in the team as well as detect obvious mistakes where for example a huge dependency lands in the main bundle. It won't trigger alarms on the limit because we are way below it but the relative size limit would already catch it.