testHealth/vue.config.js

22 lines
788 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
devServer: {
// host: '0.0.0.0', //可以忽略不写
// port: 8080, //它是用来修改你打开后的端口号的
open: true, //值为 true的话项目启动时自动打开到浏览器里边 false不会打开
proxy: {
'/api': {
target: 'http://172.27.6.139/api', //跨域请求的公共地址
ws: false, //也可以忽略不写,不写不会影响跨域
changeOrigin: true, //是否开启跨域,值为 true 就是开启, false 不开启
pathRewrite: {
'^/api': '' //注册全局路径, 但是在你请求的时候前面需要加上 /api
}
}
}
}
})