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, }, };