wujingjing
2025-03-11 c1a3dd10fb9a5341edaddbe28192d22020ee3990
vite.config.ts
@@ -39,14 +39,14 @@
         // Components({
         //    resolvers: [ElementPlusResolver()],
         // }),
         visualizer({
            gzipSize: true,
            brotliSize: true,
            emitFile: false,
            filename: 'stats.html', //分析图生成的文件名
            open: false, //如果存在本地服务端口,将在打包后自动展示
         }),
         // rollup-plugin-visualizer 打包分析,开启后,npm run build 自动打开打包后的模块图
         // visualizer({
         //    gzipSize: true,
         //    brotliSize: true,
         //    emitFile: false,
         //    filename: 'stats.html', //分析图生成的文件名
         //    open: true, //如果存在本地服务端口,将在打包后自动展示
         // }),
      ],
      root: process.cwd(),
      resolve: { alias },
@@ -59,6 +59,12 @@
         port: env.VITE_PORT as unknown as number,
         open: JSON.parse(env.VITE_OPEN),
         hmr: false,
         proxy: {
            '/events': {
               target: 'http://localhost:3000',
               changeOrigin: true
            }
         }
      },
      build: {
         // outDir: 'dist/' + mode.mode,