Files
meshtastic-firmware/mcp-server/web-ui/vite.config.ts
T
2026-06-16 14:37:06 -05:00

23 lines
705 B
TypeScript

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import tailwindcss from "@tailwindcss/vite";
// Backend (FastAPI) dev address. The pywebview/production build serves the
// SPA from FastAPI itself, so these proxies only matter under `npm run dev`.
const BACKEND = "http://127.0.0.1:8765";
export default defineConfig({
plugins: [vue(), tailwindcss()],
server: {
proxy: {
"/api": { target: BACKEND, changeOrigin: true },
"/ws": { target: BACKEND.replace("http", "ws"), ws: true },
},
},
build: {
// Built SPA is served by FastAPI from src/meshtastic_mcp/web/static.
outDir: "../src/meshtastic_mcp/web/static",
emptyOutDir: true,
},
});