zhoushihao
2024-06-03 2f367eea0033c59e3739c6821e86b3a34af49ebb
UI-Project/vite.config.js
@@ -1,6 +1,6 @@
import { fileURLToPath, URL } from 'node:url'
import {fileURLToPath, URL} from 'node:url'
import { defineConfig } from 'vite'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
@@ -22,17 +22,17 @@
    https: false,
    proxy: {
      '/api': {
        target: 'http://localhost:8080/mesModuleTools',
        target: 'http://127.0.0.1:88/',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '/mesModuleTools'),
        rewrite: (path) => path.replace(/^\/api/, '/'),
      },
      '/api2': {
        target: 'http://localhost:8081/mesModuleTools',
        changeOrigin: true,
        pathRewrite: {
          '^/api2': '',
        },
      },
      // '/api2': {
      //   target: 'http://localhost:8085/mesModuleTools',
      //   changeOrigin: true,
      //   pathRewrite: {
      //     '^/api2': '',
      //   },
      // },
    },
  },
  configureServer: ({ middlewares }) => {