feat: improve admin workflows and open-source docs

This commit is contained in:
YGC
2026-07-02 21:38:54 +08:00
parent eb568d3786
commit 751fdddc71
22 changed files with 598 additions and 152 deletions
+15 -2
View File
@@ -1,4 +1,4 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import UnoCSS from 'unocss/vite'
import { fileURLToPath, URL } from 'node:url'
@@ -12,7 +12,19 @@ import {
} from 'unocss'
// https://vite.dev/config/
export default defineConfig({
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const devApiTarget = env.VITE_DEV_API_TARGET || 'http://localhost:8080'
return {
server: {
proxy: {
'/api': {
target: devApiTarget,
changeOrigin: true,
},
},
},
plugins: [
vue(),
UnoCSS({
@@ -127,5 +139,6 @@ export default defineConfig({
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
}
})