mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-28 22:31:22 -05:00
More robust assetsInlineLimit logic
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user