benwinding / react-admin-firebase

A firebase data provider for the react-admin framework
https://benwinding.github.io/react-admin-firebase/
MIT License
460 stars 175 forks source link

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

Open kevcenteno opened 1 year ago

kevcenteno commented 1 year ago

Instead of

import { get, isEmpty } from 'lodash';

Consider doing this instead

import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
KonkretneKosteczki commented 1 year ago

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