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
Lodash dependency - required? #428
Comments
Ah, that's a trace of the node 0.10 era. Before we had transpilers like Babel or TypeScript. |
@chimurai happy to put in a PR to remove this. The only ones I can see that'll need maybe more than a simple change are: |
@Daveawb , would be really nice to have a helping hand. Not always pretty to face the facts... source: bundlephobia.com |
Says it all doesn't it 💯 Sure, I've just had to do this for a number of my own repos so happy to take a look this weekend. |
Made some headway over the weekend. A few tests still failing, will get to them this week at some point. @chimurai I've also added the |
Nice. Think it is better to have |
You can also install only the functions you really use. That should reduce the size significantly.
etc. |
@lattam I did consider this but really they still bring in a host of lodash functions that just aren't needed and still inflate the package size considerably. Also, they're removing the individual function imports in v5, see Jdaltons reply in lodash/lodash#3838 (comment) |
The priority of this task may be about to increase due to this prototype pollution vulnerability in |
Yep ok, I'll crack on at the weekend, apologies, been a bit inactive on this for a while. |
@chimurai nearly there now. I have 4 failing e2e tests that I need to sort out. |
let me know if you need any help |
Actaully a second set of eyes on this might be useful. Debugging the websocket test is a pain. |
Is this a question? Yes and... no? Go figure.
I noticed that I had the full blown version of lodash in my dependencies once I had installed this package (which is excellent btw). I started to look through the code base to see if it really was required and I have only found these usages:
context-matcher.ts
_.isFunction
_.isString
config-factory.ts
_.assign
_.isString
_.isPlainObject
handlers.ts
_.camelCase
_.get
_.isFunction
http-proxy-middleware.ts
_.assign
_.isFunction
path-rewriter.ts
_.isFunction
_.forEach
_.isEmpty
_.isPlainObject
_.isUndefined
_.isNull
_.isEqual
_.isPlainObject
_.forIn
router.ts
_.isPlainObject
_.isFunction
_.forIn
Each one of these dependencies can be achieved easily with ES6 without the need for lodash, would you be willing to receive a PR to remove this dependancy?
Most of my projects are built by CI many times / day and anything I can do to reduce the time needed to bootstrap each run is always appeciated.
Is this a bug report?
No
Is this a feature request?
Sort of. This request is to remove the lodash dependancy from the project.
Motivation:
Setup
Not applicable
The text was updated successfully, but these errors were encountered: