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 minSize option #207

Open
larionov opened this issue Apr 2, 2018 · 6 comments · May be fixed by #209
Open

Add minSize option #207

larionov opened this issue Apr 2, 2018 · 6 comments · May be fixed by #209

Comments

@larionov
Copy link

larionov commented Apr 2, 2018

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
bundlesize only checks for maxSize

What is the expected behavior?
To be able to check minSize too.

If this is a feature request, what is motivation or use case for changing the behavior?
Would be nice to check for build errors that result in empty or drastically different bundle sizes.

@siddharthkp
Copy link
Owner

🤔

I don't think this is something bundlesize should do. It can't replace the need for functional tests

@larionov
Copy link
Author

larionov commented Apr 2, 2018

@siddharthkp I agree that functional tests are needed but just now I had a problem when empty css files was generated in our package. That requires automated visual tests and that is not fast.
Also, bundlesize and maxSize names kind of imply that this package checks everything about sizes. I even tried to add minSize option in our config without checking docs first.

@siddharthkp
Copy link
Owner

siddharthkp commented Apr 2, 2018

bundlesize and maxSize names kind of imply that this package checks everything about sizes

I didn't try to imply that 😅

I had a problem when empty css files was generated in our package. That requires automated visual tests and that is not fast.

What would you set as the minSize for such case? > 0 bytes?

@larionov
Copy link
Author

larionov commented Apr 2, 2018 via email

@larionov larionov linked a pull request Apr 4, 2018 that will close this issue
@ghost
Copy link

ghost commented Aug 10, 2018

Would also like this feature. My project outputs a UMD library bundle with other third-party libraries included inside. It would be great for us to be alerted when our bundle size increases or decreases significantly due to a library's size changing.

@delambo
Copy link

delambo commented Feb 14, 2019

Here's another use case: If you're using webpack with aggressive bundle merging, it's nice to be alerted when a bundle size goes down so that you can reconfigure the maxSize.

larionov added a commit to larionov/bundlesize that referenced this issue Jun 10, 2022
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 a pull request may close this issue.

3 participants