Home > OS >  Why does lodash come in two variants: "Core builde" and "Full build"?
Why does lodash come in two variants: "Core builde" and "Full build"?

Time:01-09

Question is in the title. Why shouldn't I just allways use the "Full build" in an application, as it has more features?

CodePudding user response:

Because file size is a thing that exists. If you embed features you’re not using, you’re just wasting bandwidth.

Lodash is a grab bag of utilities, some of which are relatively special-purpose; the core build is a fraction of the size and just contains the utils most likely to be needed.

(It's also worth considering whether you need lodash at all these days. You might be better off installing only the individual lodash utils you actually need -- which may turn out to be none of them because ES6 has matured since lodash was created.)

  •  Tags:  
  • Related