import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import { fileURLToPath } from "node:url"; // The web app lives in web/ and is emitted into dist/web, which the daemon serves. export default defineConfig({ root: "web", plugins: [react(), tailwindcss()], resolve: { alias: { "@": fileURLToPath(new URL("./web/src", import.meta.url)), }, }, build: { outDir: "../dist/web", emptyOutDir: true, }, server: { // `npm run dev` serves the UI on 5173 and proxies the API to the daemon. proxy: { "/api": "http://127.0.0.1:8791", "/events": { target: "http://127.0.0.1:8791", changeOrigin: false, }, }, }, });