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

Is full lodash required? #313

Closed
mininternet opened this issue Sep 1, 2017 · 2 comments
Closed

Is full lodash required? #313

mininternet opened this issue Sep 1, 2017 · 2 comments
Labels

Comments

@mininternet
Copy link

In an effort to keep the production bundle small, would it be possible to only install the required lodash functions, rather than the entire package?

In components would be import filter from 'lodash.filter'

@diegohaz
Copy link
Owner

diegohaz commented Sep 1, 2017

We use import filter from 'lodash/filter' so, even though we have the entire lodash package installed, we only bundle those functions we actually use.

@mininternet
Copy link
Author

Ah, I see. I'm not a webpack expert, just saw the entire library in package.json, but verified with visualizer that only those functions are being bundled.

code_packages

I've been installing the individual lodash functions i've needed, but i guess can just import them from the already installed package, good to know.

Thanks!

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

No branches or pull requests

2 participants