ewdlop's picture
App.tsx
42ae0b9
Raw
History Blame Contribute Delete
672 Bytes
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
build: {
// Output directly into api/static so FastAPI serves it
outDir: "../api/static",
emptyOutDir: true,
},
server: {
port: 5173,
proxy: {
// In dev, proxy /api and /docs to the FastAPI server
"/api": "http://localhost:7860",
"/docs": "http://localhost:7860",
"/openapi.json": "http://localhost:7860",
},
},
});