From 0a5cc3052cf1e3001c8a4d2c63857982c023d3f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Tue, 4 Jun 2024 18:03:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20build=E6=97=B6=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=EF=BC=8Cdev=E6=97=B6=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E5=8E=8B=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 265f752..5f630b5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -132,7 +132,8 @@ export default ({ command, mode }) => { // 方便非h5端调试 sourcemap: VITE_SHOW_SOURCEMAP === 'true', // 默认是false target: 'es6', - minify: 'terser', + // 开发环境不用压缩 + minify: mode === 'development' ? false : 'terser', terserOptions: { compress: { drop_console: VITE_DELETE_CONSOLE === 'true',