mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-22 10:51:24 +00:00
fix date-fns dynamic import (#2716)
This commit is contained in:
parent
9ff0b93560
commit
626b18d478
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ function langToLocale(lang: string): DateFnsDesc | undefined {
|
|||
async function load(locale: DateFnsDesc): Promise<Locale> {
|
||||
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 () {
|
||||
|
|
Loading…
Reference in a new issue