Meteor and lodash

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.

Any insight is appreciated!

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 use lodash liberally in a two small and one medium size Meteor project. I’m not aware of any issues.

I use stevezhu:lodash package from atmosphere in all my projects. Yet I didn’t found any issues related to load speed til now

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.

1 Like