Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to Bundle Size Optimization society =^_^=. Let’s me introduce you Size Limit — like a linter, but for file size (feel free to close PR, I just want to show here how the tool works).
Any optimization must use benchmarking and profiling before actual optimization. I think the same rule can be applied to bundle size optimization. We need some sort of benchmark to have every-commit feedback and run this benchmark on the Travis CI to prevent accidentally regression.
For example, in some future PR, somebody could use
process
orglobal
in the wrong way, as result, your library size could be increased twice just because of few extra symbols.This is why I created Size Limit, a tool to have feedback about library size and prevent JS libraries bloat.
Here is production success stories:
And few articles, how it works inside.