From 61d7ef642a027e9e1f942bc84322233be3ca9a82 Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Thu, 22 Feb 2024 17:32:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=85=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uno.config.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/uno.config.ts b/uno.config.ts index 2de20ab8e..71d3db09b 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -8,9 +8,9 @@ const createPresetIcons = () => { const isBuild = !!process.argv[4] let env = {} as any if (!isBuild) { - env = loadEnv(process.argv[4], root) - } else { env = loadEnv(process.argv[3], root) + } else { + env = loadEnv(process.argv[4], root) } // @ts-ignore if (env.VITE_USE_ONLINE_ICON === 'true') { @@ -19,6 +19,12 @@ const createPresetIcons = () => { return [ presetIcons({ prefix: '' + // 由于默认加载的是所有的图标,启动会非常慢,可以在这里去加载需要的图标,确保启动速度 + // collections: { + // carbon: () => import('@iconify-json/carbon/icons.json').then(i => i.default), + // mdi: () => import('@iconify-json/mdi/icons.json').then(i => i.default), + // logos: () => import('@iconify-json/logos/icons.json').then(i => i.default), + // } }) ] }