1 import type { DateFnsLocaleMap } from '../interfaces/Locale';
3 const dateFnLocales = import.meta.webpackContext!('date-fns/locale', {
5 regExp: /^\.\/[a-z]{2}(-([A-Z]{2}))?\/index\.js$/,
7 chunkName: 'date-fns/[request]',
10 export default dateFnLocales.keys().reduce((acc: DateFnsLocaleMap, key: string) => {
11 const end = key.lastIndexOf('/');
12 const normalizedKey = key.slice(2, end).replace('-', '_');
13 acc[normalizedKey] = () => dateFnLocales(key);
17 export { default as enUSLocale } from 'date-fns/locale/en-US';
18 export { default as enGBLocale } from 'date-fns/locale/en-GB';
19 export { default as faIRLocale } from 'date-fns/locale/fa-IR';