From 556c608ec8622e98a940a11e6f21c6c6bf4c81e7 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Mon, 9 Sep 2024 11:19:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BE=9D=E8=B5=96=E9=A2=84=E6=9E=84?= =?UTF-8?q?=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/vite.config.mts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index 8423c3dc..07797e59 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -7,6 +7,17 @@ export default defineConfig(async () => { return { application: {}, vite: { + optimizeDeps: { + include: [ + 'echarts/core', + 'echarts/charts', + 'echarts/components', + 'echarts/renderers', + '@iconify/iconify', + 'ant-design-vue/es/locale/zh_CN', + 'ant-design-vue/es/locale/en_US', + ], + }, plugins: [ Components({ dirs: [], // 默认会导入src/components目录下所有组件 不需要 @@ -28,6 +39,9 @@ export default defineConfig(async () => { ws: true, }, }, + warmup: { + clientFiles: ['./index.html', './src/{views,components}/*'], + }, }, }, };