mirror of
https://github.com/Pacerino/CaddyProxyManager.git
synced 2026-08-04 03:05:30 -04:00
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.
26 lines
631 B
TypeScript
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",
|
|
},
|
|
},
|
|
});
|