ci: align frontend deploy with wx_service secrets-driven flow

This commit is contained in:
root
2026-03-10 18:04:02 +08:00
parent ed1fcdfdaa
commit 14590c5eda
7 changed files with 345 additions and 15 deletions
+20 -12
View File
@@ -1,18 +1,26 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
server: {
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true
},
'/healthz': {
target: 'http://localhost:8080',
changeOrigin: true
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
// 生产默认挂载在 /panel/,可通过 VITE_PUBLIC_BASE 覆盖
const base = env.VITE_PUBLIC_BASE || (mode === 'production' ? '/panel/' : '/')
return {
base,
plugins: [vue()],
server: {
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true
},
'/healthz': {
target: 'http://localhost:8080',
changeOrigin: true
}
}
}
}