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}/*'], + }, }, }, };