2d541f2e32
And disable eslint when building in prod mode Signed-off-by: Thomas Citharel <tcit@tcit.fr>
18 lines
387 B
TypeScript
18 lines
387 B
TypeScript
import Locale from "date-fns";
|
|
import VueInstance from "vue";
|
|
|
|
declare module "vue/types/vue" {
|
|
interface Vue {
|
|
$dateFnsLocale: Locale;
|
|
}
|
|
}
|
|
|
|
export function DateFnsPlugin(
|
|
vue: typeof VueInstance,
|
|
{ locale }: { locale: string }
|
|
): void {
|
|
import(`date-fns/locale/${locale}/index.js`).then((localeEntity) => {
|
|
VueInstance.prototype.$dateFnsLocale = localeEntity;
|
|
});
|
|
}
|