mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 06:36:17 +00:00
fix date-fns dynamic import (#2716)
This commit is contained in:
parent
9ff0b93560
commit
626b18d478
|
@ -136,7 +136,7 @@ function langToLocale(lang: string): DateFnsDesc | undefined {
|
||||||
async function load(locale: DateFnsDesc): Promise<Locale> {
|
async function load(locale: DateFnsDesc): Promise<Locale> {
|
||||||
return import(
|
return import(
|
||||||
/* webpackChunkName: `date-fns-[request]` */
|
/* webpackChunkName: `date-fns-[request]` */
|
||||||
`date-fns/locale/${locale.resource}.mjs`
|
`date-fns/locale/${locale.resource}.js`
|
||||||
).then(x => x.default);
|
).then(x => x.default);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ export function findDateFnsChunkNames(languages: readonly string[]): string[] {
|
||||||
if (locale.bundled) {
|
if (locale.bundled) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return [`date-fns-${locale.resource}-mjs`];
|
return [`date-fns-${locale.resource}-js`];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function () {
|
export default async function () {
|
||||||
|
|
Loading…
Reference in a new issue