File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ const createPresetIcons = () => {
8
8
const isBuild = ! ! process . argv [ 4 ]
9
9
let env = { } as any
10
10
if ( ! isBuild ) {
11
- env = loadEnv ( process . argv [ 4 ] , root )
12
- } else {
13
11
env = loadEnv ( process . argv [ 3 ] , root )
12
+ } else {
13
+ env = loadEnv ( process . argv [ 4 ] , root )
14
14
}
15
15
// @ts -ignore
16
16
if ( env . VITE_USE_ONLINE_ICON === 'true' ) {
@@ -19,6 +19,12 @@ const createPresetIcons = () => {
19
19
return [
20
20
presetIcons ( {
21
21
prefix : ''
22
+ // 由于默认加载的是所有的图标,启动会非常慢,可以在这里去加载需要的图标,确保启动速度
23
+ // collections: {
24
+ // carbon: () => import('@iconify-json/carbon/icons.json').then(i => i.default),
25
+ // mdi: () => import('@iconify-json/mdi/icons.json').then(i => i.default),
26
+ // logos: () => import('@iconify-json/logos/icons.json').then(i => i.default),
27
+ // }
22
28
} )
23
29
]
24
30
}
You can’t perform that action at this time.
0 commit comments