File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ const include = [
2
+ 'axios' ,
3
+ 'store' ,
4
+ 'echarts' ,
5
+ 'lodash-es' ,
6
+ 'resize-detector' ,
7
+ 'store/plugins/expire' ,
8
+ '@varlet/ui/es/paper/style/index.mjs' ,
9
+ '@varlet/ui/es/cell/style/index.mjs' ,
10
+ '@varlet/ui/es/switch/style/index.mjs' ,
11
+ '@varlet/ui/es/picker/style/index.mjs' ,
12
+ '@varlet/ui/es/counter/style/index.mjs' ,
13
+ '@varlet/ui/es/space/style/index.mjs' ,
14
+ ]
15
+
16
+ const exclude = [
17
+ '@iconify-json/carbon' ,
18
+ ]
19
+
20
+ export { include , exclude }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { ConfigEnv, UserConfig } from 'vite'
5
5
import viewport from 'postcss-mobile-forever'
6
6
import autoprefixer from 'autoprefixer'
7
7
import { createVitePlugins } from './build/vite'
8
+ import { exclude , include } from './build/vite/optimize'
8
9
9
10
export default ( { mode } : ConfigEnv ) : UserConfig => {
10
11
const root = process . cwd ( )
@@ -51,5 +52,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
51
52
cssCodeSplit : false ,
52
53
chunkSizeWarningLimit : 2048 ,
53
54
} ,
55
+
56
+ optimizeDeps : { include, exclude } ,
54
57
}
55
58
}
You can’t perform that action at this time.
0 commit comments