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

fix: Remove lodash and replace table #22

Closed

Conversation

timneutkens
Copy link
Contributor

@timneutkens timneutkens commented Aug 26, 2018

Follow-up of unjs/consola#20

lodash has a 1.1MB install size and is 60% of webpackbar according to bundlephobia and packagephobia:

Regarding replacing the table dependency:

table is 29.2KB based on bundlephobia.com/result?p=table@4.0.3 it also has a 3MB install size and has a dependency on lodash.

text-table has no dependencies and is 11KB in total.

The goal of the PR is just to replace lodash, maybe some of these functions can be removed alltogether

Uses the much smaller single util packages.
table is 29.2KB based on https://bundlephobia.com/result?p=table@4.0.3 it also has a 3MB install size. It also has a dependency on lodash.

text-table has no dependencies and is 11KB in total.
@timneutkens
Copy link
Contributor Author

It seems like there's only a check on Windows 🤔

@pi0
Copy link
Member

pi0 commented Aug 28, 2018

Hi. Thanks for this PR. I really appreciate your help.

Regarding lodash, things are more complicated than just checking this plugin against bundlephobia.

Most of the users are using this package alongside with other dependencies that depend on lodash but may not depend on lodash.* dependencies. So at usual cases we are reusing lodash and i think it would be better to use that dependency.

pi0 added a commit that referenced this pull request Oct 31, 2018
pi0 added a commit that referenced this pull request Oct 31, 2018
@pi0
Copy link
Member

pi0 commented Oct 31, 2018

@timneutkens Really thanks for your contribution. I've removed lodash dependency (at all) and replaced table with text-table as you suggested. WP3 is coming soon :)

@pi0 pi0 closed this Oct 31, 2018
@timneutkens timneutkens deleted the fix/remove-lodash-and-table branch October 31, 2018 18:41
@timneutkens
Copy link
Contributor Author

💯

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