From 3b1d908beb4ea4aa6476ae4f6695765e6aab40a9 Mon Sep 17 00:00:00 2001 From: tyh2001 <1469442737@qq.com> Date: Tue, 9 Aug 2022 15:27:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fighting-design/package.json | 2 +- vite.config.lib.ts | 6 +++--- vite.config.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/fighting-design/package.json b/packages/fighting-design/package.json index 110e71b380..b239a20b2a 100644 --- a/packages/fighting-design/package.json +++ b/packages/fighting-design/package.json @@ -28,4 +28,4 @@ }, "homepage": "https://fighting.tianyuhao.cn", "repository": "https://github.com/FightingDesign/fighting-design" -} \ No newline at end of file +} diff --git a/vite.config.lib.ts b/vite.config.lib.ts index 8015cedaa3..7126d46ebd 100644 --- a/vite.config.lib.ts +++ b/vite.config.lib.ts @@ -24,7 +24,7 @@ export default (): UserConfigExport => { mode: 'production', build: { target: 'modules', - minify: false, + minify: true, chunkSizeWarningLimit: 2, reportCompressedSize: false, outDir: resolve(__dirname, 'dist/lib'), @@ -39,8 +39,8 @@ export default (): UserConfigExport => { external: ['vue'], preserveModules: true, output: { - format: 'cjs', - preserveModules: true, + // format: 'cjs', + // preserveModules: true, globals: { vue: 'Vue' } diff --git a/vite.config.ts b/vite.config.ts index 1254ab2f37..55b54d2e8c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,7 +5,7 @@ import type { UserConfigExport } from 'vite' import vue from '@vitejs/plugin-vue' import vueSetupExtend from 'unplugin-vue-setup-extend-plus/vite' import { resolve } from 'path' -import dts from 'vite-plugin-dts' +import dts from 'vite-plugin-dts' // https://github.com/qmhc/vite-plugin-dts export default (): UserConfigExport => { return { @@ -24,7 +24,7 @@ export default (): UserConfigExport => { mode: 'production', build: { target: 'modules', - minify: false, // 压缩 + minify: true, // 压缩 chunkSizeWarningLimit: 2, // 超过 2kb 警告提示 reportCompressedSize: false, outDir: resolve(__dirname, 'dist/es'),