wms_xizhou/front/vue.config.js

20 lines
746 B
JavaScript
Raw Permalink Normal View History

2025-08-21 10:46:41 +08:00
const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: {
plugins: [new NodePolyfillPlugin()]
},
devServer: {
port: 12306, // 端口
proxy: {
'/authorize': { // 若请求的前缀不是这个'/wms',那请求就不会走代理服务器
target: "https://login.microsoftonline.com/caterpillar.onmicrosoft.com/", //这里写路径
pathRewrite: { '^/authorize': '' }, //将所有含/wms路径的去掉/wms转发给服务器
ws: true, //用于支持websocket
changeOrigin: true //用于控制请求头中的host值
},
}
},
})