The Express server was binding to both 127.0.0.1 and a specific Tailscale IP (100.84.4.113), creating two separate http.Server instances. Simplify to a single localhost binding. Also update Vite dev server to use 127.0.0.1 instead of the Tailscale IP and disable the HMR error overlay which obscures the UI during development. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
559 B
TypeScript
31 lines
559 B
TypeScript
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,
|
|
host: "127.0.0.1",
|
|
hmr: {
|
|
overlay: false,
|
|
},
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:3848",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "../../dist/client",
|
|
emptyOutDir: true,
|
|
},
|
|
});
|