CodeLens / dashboard /vite.config.ts
ArshVerma's picture
Fix White Screen: Use relative asset paths (./) in Vite
a32c839
Raw
History Blame Contribute Delete
519 Bytes
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [react(), tailwindcss()],
base: "./",
build: {
outDir: "../static/dashboard", // FastAPI serves this
emptyOutDir: true,
},
server: {
proxy: {
"/api": { target: "http://localhost:7860", changeOrigin: true, rewrite: (p) => p.replace(/^\/api/, "") },
"/ws": { target: "ws://localhost:7860", ws: true },
},
},
});