bithavoc / express-winston

express.js middleware for winstonjs
https://www.npmjs.com/package/express-winston
MIT License
797 stars 187 forks source link

Use only individual lodash npm packages #152

Closed amiram closed 7 years ago

amiram commented 7 years ago

Currently lodash is required but just a few functions are used. It is possible to use just a small npm package for each function. This will make node_modules much smaller. Is there any point to open a pr for that?

rosston commented 7 years ago

@amiram If this were a package that was used in the browser, I could understand wanting to lessen the lodash dependency.

But given that this is a server-side package, I don't understand the desire to make node_modules smaller. I just checked locally, and lodash only uses up 9.1mb on disk. That seems trivially small for a package that's used primarily on a server.

Am I missing something about your use case that makes that size matter?

amiram commented 7 years ago

@rosston This is not so important maybe. However, sometimes you have several deps that each need lodash but with a small diff in the version so you end up with more than one lodash folder in your modules. Consider you have some micro services, so you eventually have dozens of lodash, but if you think it is not so important then you can close it.

rosston commented 7 years ago

I'll close this for now. Perhaps as we start dropping support for older Node versions (0.10, 0.12) in future releases, I'll revisit dropping some of the lodash functions.