2024-07-02 08:16:55 +08:00
|
|
|
|
const { defineConfig } = require('@vue/cli-service')
|
|
|
|
|
|
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = defineConfig({
|
2024-08-07 23:12:42 +08:00
|
|
|
|
publicPath: '/wms',
|
2024-07-02 08:16:55 +08:00
|
|
|
|
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值
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
})
|