Skip to content
Snippets Groups Projects
Commit 89f8ab26 authored by insert's avatar insert
Browse files

Use relative imports for dayjs.

parent 2acb3aeb
Branches
No related merge requests found
...@@ -138,9 +138,7 @@ function Locale({ children, locale }: Props) { ...@@ -138,9 +138,7 @@ function Locale({ children, locale }: Props) {
async (lang_file) => { async (lang_file) => {
const defn = lang_file.default; const defn = lang_file.default;
const target = lang.dayjs ?? lang.i18n; const target = lang.dayjs ?? lang.i18n;
const dayjs_locale = await import( const dayjs_locale = await import(`../../node_modules/dayjs/esm/locale/${target}.js`);
/* @vite-ignore */ `/node_modules/dayjs/esm/locale/${target}.js`
);
if (defn.dayjs) { if (defn.dayjs) {
dayjs.updateLocale(target, { calendar: defn.dayjs }); dayjs.updateLocale(target, { calendar: defn.dayjs });
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment