核工业西南物理研究院知识库AI客户端
xiangpei
2025-04-16 6abf7642caa66239f3f3e75454811f95aaf50a26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    compress: false,
    proxy: {
      "/api": {
        target: 'http://i-1.gpushare.com:52574/',//代理地址 凡是使用/api
        changeOrigin: true,//允许跨域请求
        secure: false,
        pathRewrite: { //重写路径 替换请求地址中的指定路径
          ['^/api']: '/' //将请求地址中的api替换为空
        }
      }
    }
  }
})