import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import path from "path"; export default defineConfig({ plugins: [react()], root: "src/client", resolve: { alias: { "@shared": path.resolve(__dirname, "src/shared"), }, }, server: { port: 3847, // Vite only supports one host. Use Tailscale IP so it's reachable // from both the local machine (via the TS IP) and the tailnet. // localhost:3847 won't work for the Vite dev server — use the TS IP. host: "100.84.4.113", proxy: { "/api": { target: "http://127.0.0.1:3848", changeOrigin: true, }, }, }, build: { outDir: "../../dist/client", emptyOutDir: true, }, });