mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +00:00
Use relative imports for dayjs.
This commit is contained in:
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user