use per-method packages instead of a single import for lodash #411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Made
Changed the lodash import to only import methods that are actually used, so we don't have to download & install the whole package. This is the first of the three changes suggested in #383.
One important thing worth mentioning is that lodash appears to be pulling support for single-method packages going forward. As laid out in the linked article, the official response from lodash to those not wishing to import the full 1.4MB package is now "let the bundler handle it", which suggests to me that either the server-side case was not considered, or the server-side case was considered and judged not to be a priority. I leave it up to you all whether staying on lodash 4 is worth the space savings or not
Also, FYI - your contributing guide appears to be out of date.
Potential Risks
Only risk is typoes, or breaking api changes between the all-in-one lodash package and the per-method packages.
Test Plan
no new functionality added - just need to run CI and do any necessary manual testing to ensure there aren't regressions.
Checklist