import { fileURLToPath } from "node:url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; // The build is embedded in the Go binary (internal/web/dist/app) and served under // whatever prefix the proxy gives it (/tracker/ in production), so every asset // URL is relative. export default defineConfig({ plugins: [vue()], base: "./", build: { outDir: fileURLToPath(new URL("../internal/web/dist/app", import.meta.url)), emptyOutDir: true, }, server: { // `make run` serves the API on :8080 with AUTH_MODE=dev. proxy: { "/api": "http://localhost:8080", "/tracker.user.js": "http://localhost:8080", }, }, });