From 85f837ae4ea5bb693217433a489addd60ac20b17 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Wed, 1 Apr 2026 18:33:56 +0300 Subject: [PATCH] More robust assetsInlineLimit logic --- vite.config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index acbe9a0ec..e6c0c3c9b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -69,11 +69,11 @@ export default defineConfig(({ mode }) => { ], }, build: { - // this is mostly done so that i18n jsons as defined in ./app/modules/i18n/loader.ts - // do not end up in the js bundle as minimized strings - // if we decide later that this is a useful optimization in some cases then we can - // switch the value to a callback one that checks the file path - assetsInlineLimit: 0, + assetsInlineLimit: (filePath: string) => { + if (/\/locales\/[^/]+\/[^/]+\.json$/.test(filePath)) return false; + + return undefined; + }, sourcemap: true, }, };