Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you care about filesize, you'll probably optimize as much as possible. You can do this with Lodash using modular imports.

There's little upside in hosting a light version, and fragmenting the docs. Min/max'ing on filesize lets you save 15 kB, or 0 kB. Creating a light build that saves 5 kB is a maintenance cost with a poor ratio relative to reward.



> If you care about filesize

I don't care about filesize. I care about code complexity. The more crap you add to a page, the slower it will run. You also get a higher probability of conflicts and problems in the long run.

If you need something, you need something. But if you don't and you just throw it in there, you're asking for problems down the road.


For an example of cherry-picking lodash modules see

https://github.com/postaljs/postal.js/issues/91#issuecomment....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: