import { defineConfig } from "vite"; import preact from "@preact/preset-vite"; import tailwindcss from "@tailwindcss/vite"; // Бэк для дев-прокси выбирается портом, не правкой кода: // BACKEND_PORT=8081 pnpm dev -> прокси на вторую (рабочую/дев) копию. const apiTarget = `http://localhost:${process.env.BACKEND_PORT ?? 8080}`; export default defineConfig({ plugins: [preact(), tailwindcss()], server: { proxy: { // Connect RPC calls in dev go straight to the Go server. "/homelab.v1.HomelabService": apiTarget, }, }, });