From efafeb06f64e11eba4d62b61e76dd235bc9abf19 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 18 十一月 2024 12:01:53 +0800
Subject: [PATCH] 新用户向导

---
 vite.config.ts |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/vite.config.ts b/vite.config.ts
index e9c23f4..18ea869 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -4,6 +4,9 @@
 import tailwindcss from 'tailwindcss';
 import type { ConfigEnv } from 'vite';
 import { defineConfig, loadEnv } from 'vite';
+import { CodeInspectorPlugin } from 'code-inspector-plugin';
+import { visualizer } from 'rollup-plugin-visualizer';
+
 import viteCompression from 'vite-plugin-compression';
 import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
 const pathResolve = (dir: string) => {
@@ -19,10 +22,22 @@
 	const env = loadEnv(mode.mode, process.cwd());
 	return {
 		plugins: [
+			CodeInspectorPlugin({
+				bundler: 'vite',
+				hotKeys: ['shiftKey'],
+			}),
 			vue(),
 			vueSetupExtend(),
 			viteCompression({
 				threshold: 1024000,
+			}),
+			visualizer({
+				gzipSize: true,
+				brotliSize: true,
+				emitFile: false,
+				filename: 'stats.html', //鍒嗘瀽鍥剧敓鎴愮殑鏂囦欢鍚�
+
+				open: true, //濡傛灉瀛樺湪鏈湴鏈嶅姟绔彛锛屽皢鍦ㄦ墦鍖呭悗鑷姩灞曠ず
 			}),
 		],
 		root: process.cwd(),
@@ -35,7 +50,7 @@
 			host: '0.0.0.0',
 			port: env.VITE_PORT as unknown as number,
 			open: JSON.parse(env.VITE_OPEN),
-			hmr: true,
+			hmr: false,
 		},
 		build: {
 			// outDir: 'dist/' + mode.mode,

--
Gitblit v1.9.3