Files
descrybe/apps/web/vite.config.ts
T
greeneclipse 8580c996c3 Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
2026-08-09 22:47:43 +02:00

27 lines
988 B
TypeScript

import tailwindcss from "@tailwindcss/vite";
import { sveltekit } from "@sveltejs/kit/vite";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vite";
import { DEV_API_PROXY_TARGET, DEV_WEB_PORT } from "../../scripts/dev-ports.mjs";
const monorepoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
export default defineConfig({
// Load PUBLIC_* from monorepo-root .env (same file as the Go API).
envDir: monorepoRoot,
plugins: [tailwindcss(), sveltekit()],
server: {
// true → all interfaces (IPv4 + IPv6). Default localhost is ::1-only on Windows,
// which breaks 127.0.0.1 probes and some browser Happy Eyeballs paths.
host: true,
port: DEV_WEB_PORT,
strictPort: true,
proxy: {
"/api": { target: DEV_API_PROXY_TARGET, changeOrigin: true },
"/healthz": { target: DEV_API_PROXY_TARGET, changeOrigin: true },
"/readyz": { target: DEV_API_PROXY_TARGET, changeOrigin: true }
}
}
});