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

tree shaking lodash dependency #1107

Merged
merged 4 commits into from
Nov 4, 2021
Merged

tree shaking lodash dependency #1107

merged 4 commits into from
Nov 4, 2021

Conversation

stackoverfloweth
Copy link
Contributor

@stackoverfloweth stackoverfloweth commented Nov 3, 2021

PR Checklist:

  • add a short description of what's changed to the top of the CHANGELOG.md
  • add/update tests (or don't, for reasons explained below)

Describe this PR

Per Lodash documentation

Lodash methods are available in standalone per method packages like lodash.mapvalues, lodash.pickby, etc. These packages contain only the code the method depends on.
However, use of these packages is discouraged and they will be removed in v5.

with moving away from per-method-packages and webpacks built in tree shaking, I was able to reduce lodash's impact on our bundle from 531.3K to 100.5K

should have zero impact on users

zhen0
zhen0 previously approved these changes Nov 3, 2021
Copy link
Member

@zhen0 zhen0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @stackoverfloweth - would you mind updating to the latest version master so we can merge? Thanks!

znicholasbrown
znicholasbrown previously approved these changes Nov 4, 2021
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.

3 participants