Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Size Limit #5

Closed
wants to merge 1 commit into from
Closed

Add Size Limit #5

wants to merge 1 commit into from

Conversation

ai
Copy link

@ai ai commented Nov 28, 2017

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 or global 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.

@sindresorhus
Copy link
Owner

I think you misunderstood my intention :) The size mention is just an observation, not a constraint. I'm not going to stop useful features from being added just to keep the size down, nor am I going to make the code less readable to keep the size down.

size-limit looks like a useful project if you do want to enforce the max size, but I don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants