智慧园区前端大屏
linwe
2024-11-13 b8440d9a6b1671cdf0c8f06cdaba2f80a8dac1e6
vite.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-25 10:56:27
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-10-29 21:44:48
 * @LastEditTime: 2024-11-12 14:02:19
 * @FilePath: \bigScreen\vite.config.js
 * @Description: 
 * 
@@ -15,6 +15,7 @@
import AutoImport from 'unplugin-auto-import/vite'
import basicSsl from '@vitejs/plugin-basic-ssl'
import { fa } from 'element-plus/es/locales.mjs'
export default ({ mode, command }) => {
  const env = loadEnv(mode, process.cwd())
@@ -24,7 +25,7 @@
  // 根据是否生产环境,动态设置压缩配置
  const buildConfig = {
    outDir: 'manage',
    outDir: 'zhyq',
    target: 'esnext',
    minify: isProd ? 'terser' : 'esbuild', // 根据环境选择压缩工具
  }
@@ -80,12 +81,29 @@
      port: 668,
      https: true,
      host: '0.0.0.0',
      // hmr:{
      //   overlay:false
      // },
      proxy: {
        '/api': {
        '/panorama': {
          // target: 'http://localhost',
          target: 'https://wrj.shuixiongit.com/api',
          target: 'http://vr.jxpskj.com:180',
          changeOrigin: true,
          rewrite: path => path.replace(/^\/api/, ''),
          rewrite: path => path.replace(/^\/panorama/, ''),
        },
        '/zhyq/mx': {
          // target: 'http://localhost',
          target: 'https://wrj.shuixiongit.com/zhyq/mx',
          changeOrigin: true,
          rewrite: path => path.replace(/^\/zhyq\/mx/, ''),
        },
        '/zhyqapi': {
          // target: 'http://localhost:15870',
          target: 'https://wrj.shuixiongit.com/zhyqapi',
          changeOrigin: true,
          rewrite: path => path.replace(/^\/zhyqapi/, ''),
        },
      },
    },