Files
sundynix-pets/pets-be/web/admin/vite.config.ts
T
Blizzard 8de48cb44d
ci-cd / verify (push) Successful in 1m48s
ci-cd / deploy (push) Skipped
Serve admin console at root path
2026-10-01 14:13:04 +08:00

26 lines
522 B
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'node:path'
// https://vite.dev/config/
export default defineConfig({
base: '/',
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
// 产物直接落到 Go 内嵌目录,供 go:embed 打包
outDir: '../../internal/admin/dist',
emptyOutDir: true,
},
server: {
port: 5173,
proxy: {
'/api': 'http://localhost:9090',
},
},
})