mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +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_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
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
@ -35,7 +35,7 @@ module.exports = {
|
|||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
['/proxy-api']: {
|
||||||
target: `http://localhost:48080`,
|
target: `http://localhost:48080`,
|
||||||
// target: `http://api-dashboard.yudao.iocoder.cn`,
|
// target: `http://api-dashboard.yudao.iocoder.cn`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user