From 34da538019ddfa77ee65f15caf6af7d647305edc Mon Sep 17 00:00:00 2001 From: yuntian001 <479820787@qq.com> Date: Thu, 22 Sep 2022 21:43:23 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8A=A0=E4=B8=8Aelement=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=87=BD=E6=95=B0=E9=BB=98=E8=AE=A4=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index a3dec7d7..0a38841a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -190,7 +190,13 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => { }, optimizeDeps: { //因为项目中很多用到了自动引入和动态加载,所以vite首次扫描依赖项会扫描不全,这里强制扫描全局。 - entries: ['./src/**/*.{ts,vue}'], + entries: ['./src/**/*.{ts,tsx,vue}'], + include: [ + 'element-plus/es/components/loading/style/css', + 'element-plus/es/components/message/style/css', + 'element-plus/es/components/message-box/style/css', + 'element-plus/es/components/notification/style/css', + ], }, }; };