From 3cedfede6934fcdabe7394d8a88d1826e72e78e2 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 13 十二月 2024 17:14:09 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.Admin.V1.0 into test --- vite.config.ts | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index b355b5a..a568226 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,3 +1,4 @@ +import { viteCommonjs } from '@originjs/vite-plugin-commonjs'; import vue from '@vitejs/plugin-vue'; import autoprefixer from 'autoprefixer'; import { resolve } from 'path'; @@ -6,6 +7,8 @@ import { defineConfig, loadEnv } from 'vite'; import viteCompression from 'vite-plugin-compression'; import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'; +import { CodeInspectorPlugin } from 'code-inspector-plugin'; + const pathResolve = (dir: string) => { return resolve(__dirname, '.', dir); }; @@ -19,11 +22,18 @@ const env = loadEnv(mode.mode, process.cwd()); return { plugins: [ + vue(), vueSetupExtend(), + viteCommonjs(), + viteCompression({ threshold: 1024000, }), + // CodeInspectorPlugin({ + // bundler: 'vite', + // hotKeys: ['shiftKey'], + // }), ], root: process.cwd(), resolve: { alias }, @@ -35,7 +45,7 @@ host: '0.0.0.0', port: env.VITE_PORT as unknown as number, open: JSON.parse(env.VITE_OPEN), - hmr: true, + hmr: false, proxy: { '/gitee': { target: 'https://gitee.com', -- Gitblit v1.9.3