webman迁移

This commit is contained in:
2026-03-08 23:57:47 +08:00
parent 3c67427bbb
commit 699761aad2
19 changed files with 145 additions and 41 deletions

View File

@@ -4,5 +4,5 @@ ENV = 'development'
# base路径
VITE_BASE_PATH = './'
# 本地环境接口地址 - 尾部无需带'/'
VITE_AXIOS_BASE_URL = 'http://localhost:8787'
# 本地环境接口地址 - 用空字符串走同源,由 vite 代理到 8787避免 CORS
VITE_AXIOS_BASE_URL = ''

View File

@@ -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,