Files
CaddyProxyManager/frontend/vite.config.ts
Pacerino 5e6c6b083c [Frontend] Rewrite SPA with Vite, React, TypeScript, Tailwind and shadcn/ui
Replace the Create React App frontend with a modern Vite stack. Adds a
login page (local form or SSO depending on auth mode), an OIDC callback
page, and a hosts page with create/edit/delete. Build output is emitted
into backend/embed/assets for embedding in the binary.
2026-06-14 02:35:41 +02:00

26 lines
631 B
TypeScript

import path from "node:path";
import { defineConfig } from "vite";
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"),
},
},
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",
},
},
});