If you are using babel, you should check out babel-plugin-lodash, it will cherry-pick the parts of lodash you are using for you, less hassle and a smaller bundle.
It has a few limitations:
- You must use ES2015 imports to load Lodash
- Babel < 6 & Node.js < 4 aren’t supported
- Chain sequences aren’t supported. See this blog post for alternatives.
- Modularized method packages aren’t supported