38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
proxy: {
|
|
// Proxy all LangGraph API calls through Vite dev server
|
|
// so browser uses same origin (:5173) and Docker internal DNS resolves langgraph-dev
|
|
"/threads": {
|
|
target: process.env.LANGGRAPH_BACKEND_URL ?? process.env.VITE_LANGGRAPH_URL ?? "http://localhost:2024",
|
|
changeOrigin: true,
|
|
},
|
|
"/runs": {
|
|
target: process.env.LANGGRAPH_BACKEND_URL ?? process.env.VITE_LANGGRAPH_URL ?? "http://localhost:2024",
|
|
changeOrigin: true,
|
|
},
|
|
"/assistants": {
|
|
target: process.env.LANGGRAPH_BACKEND_URL ?? process.env.VITE_LANGGRAPH_URL ?? "http://localhost:2024",
|
|
changeOrigin: true,
|
|
},
|
|
"/store": {
|
|
target: process.env.LANGGRAPH_BACKEND_URL ?? process.env.VITE_LANGGRAPH_URL ?? "http://localhost:2024",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|