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

Consider importing lodash methods directly in order to reduce bundle sizes #266

Open
kevcenteno opened this issue Mar 9, 2023 · 1 comment

Comments

@kevcenteno
Copy link

Instead of

import { get, isEmpty } from 'lodash';

Consider doing this instead

import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
@KonkretneKosteczki
Copy link

KonkretneKosteczki commented Mar 28, 2023

I like the idea, just take into account that lodash is used not only in the arrayHelpers but also in FireClient and translate-from-firestore so there is more imports to take care of.

In the meantime if bundle sizes bother you that much, you can try build plugins that would do roughly the same thing for you but automatically. For webpack For babel

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

No branches or pull requests

2 participants