Skip to content

best way to save what you love

web/vite: split transformers.js into separate chunk

jj2273bb388f87
diff --git a/web/vite.config.ts b/web/vite.config.ts
index f762fbbc..e37aebb2 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -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) {