Open thomastvedt opened 6 months ago
@thomastvedt sir this will definitely import all the locales even if we are using just one or two. The drawback of this is that since all the locales are being imported unnecessarily, our bundle size will increase which can harm site's performance. Instead, we can do like this :- import { enUS, es, fr } from 'date-fns/locale';
It would be great if rc-picker could support only loading locales that are used 👌🌸
https://github.com/react-component/picker/blob/e3f8437ad9c8b280868864a56aaa722c129e354b/src/generate/dateFns.ts#L27
This will import all locales from date-fns, right? Even if only one or two locales are used, this will import all of them?