From 503514d98e7d1b664f9cea2f3a803e9f904dcde0 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Tue, 17 Sep 2024 21:53:46 +0000 Subject: [PATCH] web/vite: exclude .md files from i18n chunks --- web/vite.config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/vite.config.ts b/web/vite.config.ts index 37a77956..5faa8c0f 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -43,7 +43,6 @@ const exposeLibAV: PluginOption = (() => { for (const module of modules) { const distFolder = join(IMPUT_MODULE_DIR, module, 'dist/'); - console.log(distFolder); await cp(distFolder, assets, { recursive: true }); } } @@ -72,7 +71,7 @@ export default defineConfig({ rollupOptions: { output: { manualChunks: (id) => { - if (id.includes('/web/i18n')) { + if (id.includes('/web/i18n') && id.endsWith('.json')) { const lang = id.split('/web/i18n/')?.[1].split('/')?.[0]; if (lang) { return `i18n_${lang}`;