This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

niri / apps / web / vite.config.ts
900 B 33 lines
1import path from "node:path" 2import { fileURLToPath } from "node:url" 3import { defineConfig, loadEnv } from "vite" 4import react from "@vitejs/plugin-react" 5 6const WEB_DIR = path.dirname(fileURLToPath(import.meta.url)) 7const REPO_ROOT = path.resolve(WEB_DIR, "../..") 8 9export default defineConfig(({ mode }) => { 10 const env = loadEnv(mode, REPO_ROOT, "") 11 const backendPort = env.PORT ?? "3000" 12 const backendTarget = env.NIRI_PROXY_TARGET ?? `http://127.0.0.1:${backendPort}` 13 14 return { 15 envDir: REPO_ROOT, 16 base: mode === "production" ? "/ui/" : "/", 17 plugins: [react()], 18 server: { 19 host: true, 20 proxy: { 21 "/agents": backendTarget, 22 "/health": backendTarget, 23 "/trigger": backendTarget, 24 "/chat": backendTarget, 25 "/status": backendTarget, 26 "/metrics": backendTarget, 27 }, 28 }, 29 preview: { 30 host: true, 31 }, 32 } 33})