chore: 依赖预构建

This commit is contained in:
dap 2024-09-09 11:19:58 +08:00
parent 7fa27837d2
commit 556c608ec8

View File

@ -7,6 +7,17 @@ export default defineConfig(async () => {
return { return {
application: {}, application: {},
vite: { 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: [ plugins: [
Components({ Components({
dirs: [], // 默认会导入src/components目录下所有组件 不需要 dirs: [], // 默认会导入src/components目录下所有组件 不需要
@ -28,6 +39,9 @@ export default defineConfig(async () => {
ws: true, ws: true,
}, },
}, },
warmup: {
clientFiles: ['./index.html', './src/{views,components}/*'],
},
}, },
}, },
}; };