Files
CaddyProxyManager/frontend/vite.config.ts
Pacerino a33d535352 [Tests][CI] Add backend/frontend test suites and refactor test tooling
Add unit/integration tests across backend handlers, auth, caddy and
util packages, plus frontend component and API tests with the new
test setup. Update CI workflow and Vite config to run the suites.
2026-06-15 14:17:39 +02:00

32 lines
757 B
TypeScript

import path from "node:path";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./src/test/setup.ts"],
css: false,
},
build: {
// Build straight into the Go embed directory so the binary picks it up.
outDir: "../backend/embed/assets",
emptyOutDir: true,
},
server: {
proxy: {
// Proxy API calls to the Go backend during development.
"/api": "http://localhost:3001",
},
},
});