web/vite: split transformers.js into separate chunk
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled

This commit is contained in:
jj 2025-01-16 20:42:58 +00:00
parent 8a5b25b4ce
commit 2273bb388f
No known key found for this signature in database

View file

@ -88,6 +88,9 @@ export default defineConfig({
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes('huggingface/transformers'))
return 'hf_transformers';
if (id.includes('/web/i18n') && id.endsWith('.json')) {
const lang = id.split('/web/i18n/')?.[1].split('/')?.[0];
if (lang) {