Fix importing emoji loader statically inside worker (#38541)
This commit is contained in:
2 files changed
+7
-3
No files matched your search
@@ -302,7 +302,8 @@ async function toLoadedLocale(localeString: string) {
|
||||
}
|
||||
if (!loadedLocales.has(locale)) {
|
||||
log('Locale %s not loaded, importing...', locale);
|
||||
const { importEmojiData } = await import('./loader');
|
||||
// Ignore the INEFFECTIVE_DYNAMIC_IMPORT Vite warning, since the static import location is inside an inlined web worker.
|
||||
const { importEmojiData } = await import(/* @vite-ignore */ './loader');
|
||||
await importEmojiData(locale);
|
||||
return locale;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user