落地埋点 ingest/数据看板、首页宫格 CMS 与测评上下架;含账号引导、问答流式与免责声明去重,以及 review P1 审计同事务修复。 Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
755 B
TypeScript
29 lines
755 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
// Production is mounted at https://…/psy/admin/ ; local `vite` still uses `/`.
|
|
base: process.env.VITE_BASE || (process.env.NODE_ENV === 'production' ? '/psy/admin/' : '/'),
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8080',
|
|
changeOrigin: true,
|
|
},
|
|
'/psy/api': {
|
|
target: 'http://127.0.0.1:8080',
|
|
changeOrigin: true,
|
|
rewrite: (p) => p.replace(/^\/psy\/api/, '/api'),
|
|
},
|
|
},
|
|
},
|
|
})
|