This repository has been archived on 2023-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
love-nav-ui/vue.config.js
2023-12-20 01:48:24 +08:00

45 lines
1.1 KiB
JavaScript

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
client: {
overlay: false // 编译错误时,取消全屏覆盖
},
proxy: {
'/api': {
//后端接口的baseurl
target: 'http://localhost:8082/helloGithub_war_exploded',
//是否允许跨域
changeOrigin: true,
// ws: true, //是否代理 websockets
// secure: true,
// 'secure': true,
headers: {
Connection: "kepp-alive"
},
pathRewrite: {
//这里的作用是使用去掉api
'^/api': ''
}
},
'/image': {
//后端接口的baseurl
target: 'https://tucdn.wpon.cn/api/',
//是否允许跨域
changeOrigin: true,
// ws: true, //是否代理 websockets
// secure: true,
// 'secure': true,
headers: {
Connection: "kepp-alive"
},
pathRewrite: {
//这里的作用是使用去掉api
'^/image': ''
}
},
}
}
})