From 626b18d47883052603425daebf3869c86fac5a37 Mon Sep 17 00:00:00 2001 From: matc-pub <161147791+matc-pub@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:07:37 +0200 Subject: [PATCH] fix date-fns dynamic import (#2716) --- src/shared/utils/app/setup-date-fns.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/utils/app/setup-date-fns.ts b/src/shared/utils/app/setup-date-fns.ts index 2a27df35..68687bdf 100644 --- a/src/shared/utils/app/setup-date-fns.ts +++ b/src/shared/utils/app/setup-date-fns.ts @@ -136,7 +136,7 @@ function langToLocale(lang: string): DateFnsDesc | undefined { async function load(locale: DateFnsDesc): Promise { return import( /* webpackChunkName: `date-fns-[request]` */ - `date-fns/locale/${locale.resource}.mjs` + `date-fns/locale/${locale.resource}.js` ).then(x => x.default); } @@ -184,7 +184,7 @@ export function findDateFnsChunkNames(languages: readonly string[]): string[] { if (locale.bundled) { return []; } - return [`date-fns-${locale.resource}-mjs`]; + return [`date-fns-${locale.resource}-js`]; } export default async function () {