bundle-stats icon indicating copy to clipboard operation
bundle-stats copied to clipboard

Budgets

Open vio opened this issue 6 years ago • 6 comments

  • [x] utils: add support for budget insights
  • [ ] budget for individual assets (similar to: https://github.com/webpack/webpack/issues/3216)
  • [x] ui: Summary - add support for budget info
  • [x] ui: BudgetInsights
  • [x] ui: Totals - add support for budget insights
  • [ ] webpack-plugin: Add support for budget config
  • [ ] cli: Add support for budget config

vio avatar Oct 11 '19 16:10 vio

Is this like hard limits for sizes?

rohit-gohri avatar Jan 04 '20 17:01 rohit-gohri

@rohit-smpx The idea is just to highlight assets / metrics that are over a predefined budget, similar with the way webpack performance is doing it.

I do not have a clear roadmap on how this can be done at the moment, but couple options will be available once v2 will be ready.

vio avatar Jan 04 '20 21:01 vio

If custom budgets can be specified then this will be pretty great. And if the warning can be turned into an error on CI environments then that will help catch full module imports.

rohit-gohri avatar Jan 05 '20 05:01 rohit-gohri

that will help catch full module imports.

@rohit-smpx Unexpected module/packages imports can be spotted now, but you have to go over the assets changes and decide if the delta is larger than what you will expect. Other steps to check the modules/packages might be necessary. The bigger the project the longer it will take to decide if there is a problem or not.

The budgets will be used just to provide quick feedback if a metric or an asset size is over the budget, but there is no plan to affect the build in any way. The information will be part of the JSON report, so if need it, affecting the build will be a matter of consuming that data and decide what to do with your build based on it.

On relative-ci.com we have more options for quick feedback if a budget is failing:

  1. github check status (currently neutral for every job)
  2. Slack/Email notification

vio avatar Jan 05 '20 09:01 vio

@vio could we at least return a exit 0 or something to tell CI tools that it passed? And then if a budget fails, we send exit 1.

jflayhart avatar Dec 11 '20 14:12 jflayhart

@jflayhart thanks for your feedback, we will probably need to handle this through an optional argument/option for the cli/webpack-plugin

vio avatar Dec 12 '20 13:12 vio

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Sep 02 '23 01:09 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Oct 02 '23 01:10 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jan 01 '24 01:01 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar Feb 01 '24 01:02 github-actions[bot]