mirror of
https://github.com/Pacerino/CaddyProxyManager.git
synced 2026-08-02 18:38:37 -04:00
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.
32 lines
757 B
TypeScript
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",
|
|
},
|
|
},
|
|
});
|