-
Notifications
You must be signed in to change notification settings - Fork 43
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
Remove lodash dependency to decrease global package size #23
base: master
Are you sure you want to change the base?
Conversation
6c854e6
to
3c1de62
Compare
I've just seen #7, so I guess you can close that one if you did not change your opinion on the subject. |
+1, already discussed in #7 but this size reduction would still be beneficial for us :) |
770cb04
to
38d3507
Compare
Ok I tried something new and extracted the lodash function into the lib. It has the advantage of adding no overhead and being self-contained, with the drawback of not profitting from any of the future lodash fixes. As the copied code is quite short, I guess this could be acceptable. |
Yes please! This is the only thing dragging in the full lodash anymore, and we could save space in our build artifacts. Was going to write a similar PR, but this is already better. |
I created a patch too before seeing this and have thrown out all of the lodash functions used in production dependencies except isObjectLike() with one more generic typeOf() function. But is easily possible to inline this single function too. Afterwards lodash.flatten is only used as devDependency... Any thoughts as this patch here has not been merged by now? And hoping for lodash v5 is probably like waiting for Godot... |
Hi!
I am not sure if this repo is still active, but here is my contribution anyway.
I noticed that installing
request
+request-promise-native
adds a whole 10Mb to my project.The full Lodash is bundled and needed for only 4 basic functions (+1 for build).
I switch from
lodash.isArray
toArray.isArray
, please tell me if this is a problem.