refactor: 简化proxy配置

This commit is contained in:
zclzone
2023-06-21 21:53:33 +08:00
parent a610c1c6d0
commit 0247f3ebfa
8 changed files with 43 additions and 60 deletions

View File

@@ -1,2 +1 @@
export * from './theme.json'
export * from './proxy-config'

View File

@@ -1,18 +0,0 @@
const proxyConfigMappings = {
dev: {
prefix: '/api',
target: 'http://localhost:8080',
},
test: {
prefix: '/api',
target: 'http://localhost:8080',
},
prod: {
prefix: '/api',
target: 'http://localhost:8080',
},
}
export function getProxyConfig(envType = 'dev') {
return proxyConfigMappings[envType]
}