react-admin-firebase icon indicating copy to clipboard operation
react-admin-firebase copied to clipboard

Consider importing lodash methods directly in order to reduce bundle sizes

Open kevcenteno opened this issue 2 years ago • 1 comments

Instead of

import { get, isEmpty } from 'lodash';

Consider doing this instead

import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';

kevcenteno avatar Mar 09 '23 12:03 kevcenteno

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

KonkretneKosteczki avatar Mar 28 '23 19:03 KonkretneKosteczki