mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
基于 /proxy-api 实现代理,简化 env.local 配置
This commit is contained in:
parent
d872676748
commit
cba217cc29
@ -5,7 +5,8 @@ ENV = 'development'
|
||||
VUE_APP_TITLE = 芋道管理系统
|
||||
|
||||
# 芋道管理系统/本地环境
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
# VUE_APP_BASE_API = '/proxy-api'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
@ -35,7 +35,7 @@ module.exports = {
|
||||
open: true,
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
['/proxy-api']: {
|
||||
target: `http://localhost:48080`,
|
||||
// target: `http://api-dashboard.yudao.iocoder.cn`,
|
||||
changeOrigin: true,
|
||||
|
Loading…
Reference in New Issue
Block a user