Files
soul-yongping/soul-admin/vite.config.ts
卡若 5724fba877 feat: 小程序超级个体/个人资料/CKB获客;VIP列表展示过滤;管理端与API联调
- 超级个体:去掉首位特例;列表仅展示有头像且非微信默认昵称(vip.go)
- 个人资料:居中头像、低调联系方式、点头像优先走存客宝 lead(ckbLeadToken)
- 阅读页分享朋友圈复制与 toast 去重
- soul-api: miniprogram users 带 ckbLeadToken;其它 handler 与路由调整
- 脚本:content_upload、miniprogram 上传辅助等

Made-with: Cursor
2026-03-22 08:34:28 +08:00

34 lines
991 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
server: {
port: 5174,
proxy: {
// 与 client 中「DEV 且未设 VITE_API_BASE_URL」配合浏览器只访问 5174由 Vite 转发到 Go
// 注意:前缀 `/api` 会匹配 `/api-docs`,必须把文档页排除,否则请求落到 Go 会 404
'/api': {
target: 'http://127.0.0.1:8080',
changeOrigin: true,
bypass(req) {
const u = req.url ?? ''
if (u === '/api-docs' || u.startsWith('/api-docs?') || u.startsWith('/api-docs/')) {
return false
}
},
},
'/uploads': { target: 'http://127.0.0.1:8080', changeOrigin: true },
},
},
})