Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use per-method packages instead of a single import for lodash #411

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mprast
Copy link

@mprast mprast commented Jun 12, 2021

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

  • I've increased test coverage
  • [x ] Since this is a public repository, I've checked I'm not publishing private data in the code, commit comments, or this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant