83 lines
2.1 KiB
JavaScript
83 lines
2.1 KiB
JavaScript
require('@vue/cli-service')
|
|
// module.exports = defineConfig({
|
|
// transpileDependencies: true,
|
|
// lintOnSave: false
|
|
// })
|
|
module.exports = {
|
|
runtimeCompiler: true,
|
|
// 关闭语法检查
|
|
lintOnSave:false,
|
|
|
|
|
|
devServer: {
|
|
client: {
|
|
overlay: false,
|
|
},
|
|
// host: 'localhost', // 本地域名/ip地址
|
|
// port: '8080', // 端口号
|
|
proxy: {
|
|
'/github': {
|
|
//后端接口的baseurl
|
|
target: 'https://api.landaiqing.space/repos',
|
|
//是否允许跨域
|
|
changeOrigin: true,
|
|
// ws: true, //是否代理 websockets
|
|
// secure: true,
|
|
// 'secure': true,
|
|
headers:{
|
|
Connection:"kepp-alive"
|
|
},
|
|
pathRewrite: {
|
|
//这里的作用是使用去掉api
|
|
'^/github': ''
|
|
}
|
|
},
|
|
'/upload': {
|
|
//后端接口的baseurl
|
|
target: 'http://localhost:8082/helloGithub_war_exploded',
|
|
//是否允许跨域
|
|
changeOrigin: true,
|
|
headers:{
|
|
Connection:"kepp-alive"
|
|
},
|
|
pathRewrite: {
|
|
//这里的作用是使用去掉api
|
|
'^/upload': ''
|
|
}
|
|
},
|
|
'/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': ''
|
|
}
|
|
},
|
|
}
|
|
}
|
|
}
|