Fix build warnings: add isImageFile util, exclude heavy components

from eager glob, clean up dynamic import conflicts

- Add missing isImageFile() to format-money utils
- Exclude BaseMultiselect, InvoicePublicPage, InvoiceInformationCard
  from eager glob in global-components.ts using negative patterns
- Short-circuit English locale in i18n to avoid redundant dynamic import
- Only en.json warning remains (intentional: English bundled inline)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Darko Gjorgjijoski
2026-04-04 10:15:00 +02:00
parent af92a361a5
commit 97f88eaf2c
3 changed files with 40 additions and 17 deletions

View File

@@ -27,6 +27,13 @@ async function loadLanguageMessages(
return languageCache.get(locale)!
}
// English is already statically imported — no dynamic import needed
if (locale === 'en') {
const messages = en as unknown as Record<string, unknown>
languageCache.set('en', messages)
return messages
}
const fileName = LOCALE_FILE_MAP[locale] ?? locale
try {