Skip to content

Commit c5f0550

Browse files
committed
Update vite.config.ts
1 parent f73d7f5 commit c5f0550

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

demo/vite.config.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,47 @@ export default defineConfig({
2323
build: {
2424
outDir: 'build',
2525
emptyOutDir: true,
26+
rollupOptions: {
27+
output: {
28+
manualChunks: {
29+
// UI library chunks
30+
chakra: [
31+
'@chakra-ui/react',
32+
'@chakra-ui/icons',
33+
'@emotion/react',
34+
'@emotion/styled',
35+
'framer-motion'
36+
],
37+
// Code editor and related packages
38+
codemirror: [
39+
'@uiw/react-codemirror',
40+
'@codemirror/lang-json',
41+
'@uiw/codemirror-theme-github',
42+
'@uiw/codemirror-theme-console',
43+
'@uiw/codemirror-theme-quietlight',
44+
'@uiw/codemirror-theme-monokai'
45+
],
46+
// Icons library
47+
icons: [
48+
'react-icons/fa',
49+
'react-icons/bi',
50+
'react-icons/ai'
51+
],
52+
// Core React packages
53+
vendor: [
54+
'react',
55+
'react-dom',
56+
'wouter',
57+
'use-undo'
58+
],
59+
// JSON utilities
60+
json: [
61+
'json5',
62+
'ajv'
63+
]
64+
}
65+
}
66+
}
2667
},
2768
define: {
2869
__BUILD_TIME__: JSON.stringify(

0 commit comments

Comments
 (0)