Open
Description
If two lodash per-method packages, e.g. lodash.throttle
and lodash.debounce
, depend on an underlying lodash function (public or internal API), that function will be inlined in each of the modular build packages, bloating webpack bundle size. The modular build packages can't share any code.
On the other hand, if your package imports from lodash/throttle
, and another package imports from lodash/debounce
, they can share any underlying code they depend on and the webpack bundle will be smaller.
So the per-method packages really have no advantages, and John-David Dalton pointed out that they're going to be removed in v5.
Having lodash
as a dependency is perfectly fine as long as you always import from submodules, never its root module.
Metadata
Metadata
Assignees
Labels
No labels