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 to prevent accidental bloat #528

Merged
merged 1 commit into from Apr 12, 2018

Conversation

prichodko
Copy link
Collaborator

After this #513 great catch and huge decrease of bundle size, I decided to add size-limit to prevent from accidentally bundle something what would drastically increase it.

Note: I noticed prettier on formatOnSave in VSCode formatted also package.json, but I decided to leave it, because it's being used in a library and JSON is supported format.

@vlad-zhukov
Copy link
Contributor

vlad-zhukov commented Mar 21, 2018

This is good idea but wow, size-limit adds lots of dependencies. It looks like it uses webpack under the hood but we use rollup instead and I'm not sure how well it's going to work. Perhaps bundlesize is a better candidate?

@prichodko
Copy link
Collaborator Author

@vlad-zhukov I was thinking about bundlesize. However there is a big difference between those two

  • bundlesize outputs just a file sizes, size-limit shows the size of lib + it's dependencies (prevents unexpected huge dependency).

More info here. What do you think?

@jaredpalmer
Copy link
Owner

What should we do here?

@prichodko
Copy link
Collaborator Author

Just merge, if you agree it's a good thing to have. Let me know and I will rebase the branch.

@jaredpalmer
Copy link
Owner

Lets rebase and get it going

@prichodko
Copy link
Collaborator Author

prichodko commented Apr 10, 2018

next or master? 😄

@jaredpalmer
Copy link
Owner

Wait woah. Sorry I am out of it. Formik next is not what I want. I got confused because of how I am working on Razzle. Sorry about this. All against master. oof.

@prichodko
Copy link
Collaborator Author

prichodko commented Apr 12, 2018

@jaredpalmer rebased 😄

During test it checks Formik with all dependencies, minified and gzipped. Current output is

  ./dist/formik.js
  Package size: 11.71 KB
  Size limit:   14 KB

  ./dist/formik.es6.js
  Package size: 11.83 KB
  Size limit:   14 KB

  ./dist/formik.umd.js
  Package size: 12.23 KB
  Size limit:   14 KB

with threshold 14kb.

@jaredpalmer jaredpalmer merged commit faabe08 into jaredpalmer:master Apr 12, 2018
@prichodko prichodko deleted the feat/size-limit branch April 12, 2018 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants