use babel-plugin-lodash to reduce bundle size#28
Conversation
|
@nickaversano Thanks for the PR. |
|
|
||
| return shortcuts | ||
| const shortcuts = _.map(cursor, this._parseShortcutDescriptor) | ||
| return _.values(_.compact(_.flatten(shortcuts))) |
There was a problem hiding this comment.
Do we need _.values for anything?
There was a problem hiding this comment.
not sure, I tried to copy all existing functions over. got this from this line
There was a problem hiding this comment.
@nickaversano Yeah, here you have to call value as the chain of functions are lazily evaluated. So I think we don't need _.values in this PR.
|
As a side note, what's funny is once you get a big enough application we basically have to manually revert this. Once you hit about 15 of the lodash individual pieces, you'll want to instruct webpack to force sub-modules to use the main lodash bundle rather than all the split ones, otherwise you end up with a bigger overall bundle because lodash split out ones have extra overhead. |
|
Will it merge? |
|
We'll go with #40 instead. But thank you anyway. |
fixes #24