wms_client_miniload_bk7/vue.config.js
2024-06-21 08:16:23 +08:00

20 lines
746 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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值
},
}
},
})