2023-12-20 18:30:11 +08:00
|
|
|
const { defineConfig } = require('@vue/cli-service')
|
|
|
|
module.exports = defineConfig({
|
|
|
|
transpileDependencies: true,
|
2023-12-20 22:45:32 +08:00
|
|
|
lintOnSave:false,//关闭语法检查
|
2023-12-20 18:30:11 +08:00
|
|
|
devServer: {
|
|
|
|
client: {
|
|
|
|
overlay: false // 编译错误时,取消全屏覆盖
|
|
|
|
},
|
|
|
|
proxy: {
|
|
|
|
|
|
|
|
'/api': {
|
|
|
|
//后端接口的baseurl
|
2023-12-21 00:43:43 +08:00
|
|
|
target: 'https://open.tophub.today/daily',
|
2023-12-20 18:30:11 +08:00
|
|
|
//是否允许跨域
|
|
|
|
changeOrigin: true,
|
|
|
|
// ws: true, //是否代理 websockets
|
|
|
|
// secure: true,
|
|
|
|
// 'secure': true,
|
|
|
|
headers: {
|
|
|
|
Connection: "kepp-alive"
|
|
|
|
},
|
|
|
|
pathRewrite: {
|
|
|
|
//这里的作用是使用去掉api
|
|
|
|
'^/api': ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|