From 89f8ab2694a8c845e8ae5115852b87976cbe694e Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 20 Jun 2021 12:55:23 +0100 Subject: [PATCH] Use relative imports for dayjs. --- src/context/Locale.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/context/Locale.tsx b/src/context/Locale.tsx index cf0c3916..737eaff9 100644 --- a/src/context/Locale.tsx +++ b/src/context/Locale.tsx @@ -138,9 +138,7 @@ function Locale({ children, locale }: Props) { async (lang_file) => { const defn = lang_file.default; const target = lang.dayjs ?? lang.i18n; - const dayjs_locale = await import( - /* @vite-ignore */ `/node_modules/dayjs/esm/locale/${target}.js` - ); + const dayjs_locale = await import(`../../node_modules/dayjs/esm/locale/${target}.js`); if (defn.dayjs) { dayjs.updateLocale(target, { calendar: defn.dayjs });