webman迁移
This commit is contained in:
@@ -4,5 +4,5 @@ ENV = 'development'
|
||||
# base路径
|
||||
VITE_BASE_PATH = './'
|
||||
|
||||
# 本地环境接口地址 - 尾部无需带'/'
|
||||
VITE_AXIOS_BASE_URL = 'http://localhost:8787'
|
||||
# 本地环境接口地址 - 用空字符串走同源,由 vite 代理到 8787,避免 CORS
|
||||
VITE_AXIOS_BASE_URL = ''
|
||||
|
||||
@@ -27,6 +27,11 @@ const viteConfig = ({ mode }: ConfigEnv): UserConfig => {
|
||||
server: {
|
||||
port: parseInt(VITE_PORT),
|
||||
open: VITE_OPEN != 'false',
|
||||
// 开发时把 /api、/admin 代理到 webman,避免跨域
|
||||
proxy: {
|
||||
'/api': { target: 'http://localhost:8787', changeOrigin: true },
|
||||
'/admin': { target: 'http://localhost:8787', changeOrigin: true },
|
||||
},
|
||||
},
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
|
||||
Reference in New Issue
Block a user