vue.config.js 736 Bytes
module.exports = {
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          modifyvars: {
            'primary-color': '#002FA7'
          },
          javascriptEnabled: true
        }
      }
    }
  },
  devServer: {
    port: 8080, // 端口
    proxy: {
      //配置跨域
      "/api3": {
        target: "http://192.168.1.68:7001",
        ws: true,
        changOrigin: true,
        pathRewrite: {
          "^/api3": "/"
        }
      },
      "/api2": {
        // target: "http://192.168.3.233:8090/api/v4/projects",
        target: "http://192.168.1.16:8090/api/v4/projects",
        ws: true,
        changOrigin: true,
        pathRewrite: {
          "^/api2": "/"
        }
      }
    }
  }
};