Hey, does anyone know how well Meteor works with lodash, specifically with regards to only including the specific components we use?
For most array operations we’re using the build in array methods, and polyfilling for older browsers. But certain functions like _.sortBy don’t have an ecmascript analog, and I’d like to be able to use them. But I don’t want to bundle in the entire lodash payload.
I’m believe you can use full paths and Meteor will only include the code for that specific function. I’d give it a test for sure. If not you can install and use only the per method packages that you need and this will guarantee only necessary code is included
We have settled on using the build in ecmascript most of the the time (with Meteor’s new modern bundles, they will include no overhead from polyfills!), so including the whole package would be overkill - but lodash does have some nice methods which have no analog in ecmascript, like _.sortBy. That’s a pretty convenient method.