From 8c6fbc506e9a2c8cde56a794d8319cc55f4be666 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 11 二月 2025 15:56:48 +0800
Subject: [PATCH] 修复问题

---
 vite.config.ts |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/vite.config.ts b/vite.config.ts
index e9c23f4..27dae42 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -4,6 +4,11 @@
 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 { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
+// import AutoImport from 'unplugin-auto-import/vite';
+// import Components from 'unplugin-vue-components/vite';
 import viteCompression from 'vite-plugin-compression';
 import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
 const pathResolve = (dir: string) => {
@@ -19,11 +24,29 @@
 	const env = loadEnv(mode.mode, process.cwd());
 	return {
 		plugins: [
+			CodeInspectorPlugin({
+				bundler: 'vite',
+				hotKeys: ['shiftKey'],
+			}),
 			vue(),
 			vueSetupExtend(),
 			viteCompression({
 				threshold: 1024000,
 			}),
+			// AutoImport({
+			// 	resolvers: [ElementPlusResolver()],
+			// }),
+			// Components({
+			// 	resolvers: [ElementPlusResolver()],
+			// }),
+			// rollup-plugin-visualizer 鎵撳寘鍒嗘瀽锛屽紑鍚悗锛宯pm run build 鑷姩鎵撳紑鎵撳寘鍚庣殑妯″潡鍥�
+			// visualizer({
+			// 	gzipSize: true,
+			// 	brotliSize: true,
+			// 	emitFile: false,
+			// 	filename: 'stats.html', //鍒嗘瀽鍥剧敓鎴愮殑鏂囦欢鍚�
+			// 	open: true, //濡傛灉瀛樺湪鏈湴鏈嶅姟绔彛锛屽皢鍦ㄦ墦鍖呭悗鑷姩灞曠ず
+			// }),
 		],
 		root: process.cwd(),
 		resolve: { alias },
@@ -36,6 +59,12 @@
 			port: env.VITE_PORT as unknown as number,
 			open: JSON.parse(env.VITE_OPEN),
 			hmr: true,
+			proxy: {
+				'/events': {
+					target: 'http://localhost:3000',
+					changeOrigin: true
+				}
+			}
 		},
 		build: {
 			// outDir: 'dist/' + mode.mode,

--
Gitblit v1.9.3