wujingjing
2025-02-11 8c6fbc506e9a2c8cde56a794d8319cc55f4be666
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 },
@@ -58,7 +58,13 @@
         host: '0.0.0.0',
         port: env.VITE_PORT as unknown as number,
         open: JSON.parse(env.VITE_OPEN),
         hmr: false,
         hmr: true,
         proxy: {
            '/events': {
               target: 'http://localhost:3000',
               changeOrigin: true
            }
         }
      },
      build: {
         // outDir: 'dist/' + mode.mode,