Fix importing emoji loader statically inside worker (#38541)

This commit is contained in:
Echo authored and GitHub committed 2026-04-07 13:17:07 +00:00
1 parent 31d2885d95
commit 8e212fca59
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;
}