Files
goclaw/ui/web/vite.config.ts
T
Viet Tran f3f4c67b36 Initial commit: GoClaw AI agent gateway
Multi-agent AI gateway with WebSocket RPC, HTTP API, and messaging channel integrations.
Go port of OpenClaw with multi-tenant PostgreSQL, per-user isolation, security hardening,
and production observability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:58:07 +07:00

42 lines
1021 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const backendPort = env.VITE_BACKEND_PORT || "9600";
const backendHost = env.VITE_BACKEND_HOST || "localhost";
return {
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
port: 5173,
proxy: {
"/ws": {
target: `http://${backendHost}:${backendPort}`,
ws: true,
changeOrigin: true,
},
"/v1": {
target: `http://${backendHost}:${backendPort}`,
changeOrigin: true,
},
"/health": {
target: `http://${backendHost}:${backendPort}`,
changeOrigin: true,
},
},
},
build: {
outDir: "dist",
emptyOutDir: true,
},
};
});