Probably by not including it by default and letting user overwrite its own somewhat like this:
import allLocales from 'date-fns/locale';
import deLocale from 'date-fns/locale/de';
// just load all, will bloat size
const locales = allLocales;
// just load one locale
const locales = {
de: Locale
}
export default class PowerCalendarDays extends DaysComponent {
locales;
}
This would also allow users to not use date-fns locales but also custom implementations, based on already used intl frameworks.
I think that there's also an easier solution.
We could extract the date-fns/locale methods into a separate module and depending on the addon config, filter that module and use the unlocalized base instead.
Probably by not including it by default and letting user overwrite its own somewhat like this:
This would also allow users to not use date-fns locales but also custom implementations, based on already used intl frameworks.
I think that there's also an easier solution. We could extract the date-fns/locale methods into a separate module and depending on the addon config, filter that module and use the unlocalized base instead.