From 4351ac9657985dbd1435caa0daaf6c8a02d2eacd Mon Sep 17 00:00:00 2001 From: Ilya Kubariev Date: Thu, 5 Feb 2026 15:17:26 -0800 Subject: [PATCH] fix: Add `.jsonc` support for locale files to match docs (#2066) --- packages/i18n/src/module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/i18n/src/module.ts b/packages/i18n/src/module.ts index 68c91489..9a7f42ee 100644 --- a/packages/i18n/src/module.ts +++ b/packages/i18n/src/module.ts @@ -44,7 +44,7 @@ export default defineWxtModule({ options ?? {}; const getLocalizationFiles = async () => { - const files = await glob('*.{json,json5,yml,yaml,toml}', { + const files = await glob('*.{json,json5,jsonc,yml,yaml,toml}', { cwd: localesDir, absolute: true, }); @@ -88,7 +88,7 @@ export default defineWxtModule({ )!; if (defaultLocaleFile == null) { throw Error( - `\`[i18n]\` Required localization file does not exist: \`/${wxt.config.manifest.default_locale}.{json|json5|yml|yaml|toml}\``, + `\`[i18n]\` Required localization file does not exist: \`/${wxt.config.manifest.default_locale}.{json|json5|jsonc|yml|yaml|toml}\``, ); }