From e6fa2a5b5a33db65ed126647e8d20d244eb3fa74 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Fri, 20 Sep 2024 14:38:36 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=8C=89=E9=9C=80=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/vite.config.mts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/web-antd/vite.config.mts b/apps/web-antd/vite.config.mts index eaf487b1..1ef96aa3 100644 --- a/apps/web-antd/vite.config.mts +++ b/apps/web-antd/vite.config.mts @@ -1,7 +1,8 @@ import { defineConfig } from '@vben/vite-config'; -import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'; -import Components from 'unplugin-vue-components/vite'; +// 自行取消注释来启用按需导入功能 +// import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'; +// import Components from 'unplugin-vue-components/vite'; export default defineConfig(async () => { return { @@ -18,15 +19,15 @@ export default defineConfig(async () => { ], }, plugins: [ - Components({ - dirs: [], // 默认会导入src/components目录下所有组件 不需要 - dts: './types/components.d.ts', // 输出类型文件 - resolvers: [ - AntDesignVueResolver({ - importStyle: false, // css in js - }), - ], - }), + // Components({ + // dirs: [], // 默认会导入src/components目录下所有组件 不需要 + // dts: './types/components.d.ts', // 输出类型文件 + // resolvers: [ + // AntDesignVueResolver({ + // importStyle: false, // css in js + // }), + // ], + // }), ], server: { proxy: {