Skip to content

Commit 4f96899

Browse files
authored
Merge pull request #37 from noahlz/packaging/fix-warnings
Split renderer bundle into vendor chunks to reduce chunk size
2 parents 8350075 + ee88f24 commit 4f96899

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

TODO.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
# Ligeon TODOs
22

3-
## Issues
4-
- This odd issue:
5-
```
6-
(!) Some chunks are larger than 500 kB after minification. Consider:
7-
- Using dynamic import() to code-split the application
8-
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
9-
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
10-
```
11-
123
## Packaging
134
- CI/CD: release Mac/Win packages on tag push.
145

vite.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,27 @@ export default defineConfig({
1010
build: {
1111
outDir: 'dist',
1212
emptyOutDir: true,
13+
rollupOptions: {
14+
output: {
15+
manualChunks: {
16+
'vendor-radix': [
17+
'@radix-ui/react-collapsible',
18+
'@radix-ui/react-dialog',
19+
'@radix-ui/react-dropdown-menu',
20+
'@radix-ui/react-label',
21+
'@radix-ui/react-popover',
22+
'@radix-ui/react-progress',
23+
'@radix-ui/react-select',
24+
'@radix-ui/react-slider',
25+
'@radix-ui/react-slot',
26+
'@radix-ui/react-toggle',
27+
'@radix-ui/react-toggle-group',
28+
'@radix-ui/react-tooltip',
29+
],
30+
'vendor-chess': ['@lichess-org/chessground', 'chessops'],
31+
},
32+
},
33+
},
1334
},
1435
resolve: {
1536
alias: {

0 commit comments

Comments
 (0)