wujingjing
2025-02-24 d3efce76cd9698b364e1db3e17aec2f7ee36d0d9
vite.config.ts
@@ -7,6 +7,7 @@
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);
@@ -21,6 +22,7 @@
   const env = loadEnv(mode.mode, process.cwd());
   return {
      plugins: [
         vue(),
         vueSetupExtend(),
         viteCommonjs(),
@@ -28,6 +30,10 @@
         viteCompression({
            threshold: 1024000,
         }),
         // CodeInspectorPlugin({
         //    bundler: 'vite',
         //    hotKeys: ['shiftKey'],
         // }),
      ],
      root: process.cwd(),
      resolve: { alias },
@@ -39,7 +45,7 @@
         host: '0.0.0.0',
         port: env.VITE_PORT as unknown as number,
         open: JSON.parse(env.VITE_OPEN),
         hmr: false,
         hmr: true,
         proxy: {
            '/gitee': {
               target: 'https://gitee.com',