2026-05-21 12:07:05 +00:00
|
|
|
/// <reference types="vitest/config" />
|
2026-05-19 07:31:23 -04:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
2026-06-05 08:12:36 -04:00
|
|
|
// Build straight into the Go embed location: cmd/server/main.go has
|
|
|
|
|
// //go:embed all:src/dist relative to its package dir (cmd/server/).
|
|
|
|
|
build: {
|
|
|
|
|
outDir: 'cmd/server/src/dist',
|
|
|
|
|
emptyOutDir: true,
|
|
|
|
|
},
|
2026-05-19 07:31:23 -04:00
|
|
|
server: {
|
|
|
|
|
port: 3000,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-05-21 12:07:05 +00:00
|
|
|
test: {
|
|
|
|
|
globals: true,
|
|
|
|
|
environment: 'jsdom',
|
|
|
|
|
setupFiles: ['./src/test-setup.ts'],
|
|
|
|
|
},
|
2026-05-19 07:31:23 -04:00
|
|
|
})
|