From 50081b533544eb39cf2a69447775e91fa399fe5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E4=BD=A0=E5=90=96=E5=B0=8F=E5=88=98?= Date: Mon, 12 Jul 2021 13:38:03 +0800 Subject: [PATCH] =?UTF-8?q?build(config):=20=E4=B8=8D=E9=99=90=E5=88=B6?= =?UTF-8?q?=E4=BA=8Eserve=E5=91=BD=E4=BB=A4=E5=90=AF=E5=8A=A8=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 4c59367..93c010b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -33,17 +33,15 @@ const defineConfig: UserConfigFn = ({ command, mode }) => { }, }, }; - if (command === 'serve') { - if (mode === 'analyze') { - config.plugins.push( - visualizer({ - filename: './node_modules/.cache/visualizer/stats.html', - open: true, - gzipSize: true, - brotliSize: true, - }) - ); - } + if (mode === 'analyze') { + config.plugins.push( + visualizer({ + filename: './node_modules/.cache/visualizer/stats.html', + open: true, + gzipSize: true, + brotliSize: true, + }) + ); } return config; };