init
This commit is contained in:
44
vue.config.js
Normal file
44
vue.config.js
Normal file
@@ -0,0 +1,44 @@
|
||||
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': ''
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user