JinZHouXiYiJi_DaPin/vue.config.js

23 lines
506 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.

module.exports = {
devServer: { //开发环境的服务器配置
// 是否自动弹出浏览器默认false
open: false,
host: '0.0.0.0',
// 修改默认端口默认8080
port: 8089,
proxy: { //进行代理转发
'/api': {
// 转发的网址
target: 'http://192.168.56.136:8000',
// 是否开启本地代理 默认true
changeOrigin: true,
// 重要点
pathRewrite: {
'/api': ''
}
}
}
}
}