Skip to content

Commit bdbb849

Browse files
committed
feat: minify interface build to save space in flash
1 parent 7e5c883 commit bdbb849

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

interface/package-lock.json

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"svelte-check": "^4.2.2",
3232
"svelte-focus-trap": "^1.2.0",
3333
"tailwindcss": "^4.1.11",
34+
"terser": "^5.44.0",
3435
"tslib": "^2.8.1",
3536
"typescript": "^5.8.3",
3637
"unplugin-icons": "^22.1.0",
@@ -47,4 +48,4 @@
4748
"svelte-dnd-action": "^0.9.65",
4849
"svelte-modals": "^2.0.1"
4950
}
50-
}
51+
}

interface/vite.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ const config: UserConfig = {
2828
ws: true
2929
}
3030
}
31+
},
32+
build: {
33+
minify: 'terser',
34+
sourcemap: false,
35+
rollupOptions: {
36+
output: {
37+
manualChunks(id) {
38+
if (id.includes('node_modules')) return 'vendor';
39+
}
40+
}
41+
},
42+
cssCodeSplit: true
3143
}
3244
};
3345

0 commit comments

Comments
 (0)