Files
usaco/site/web/vite.config.js
adamfandClaude Opus 5.5 6d956f1c76 Add the website: Go server + Vue SPA in site/, with CI
A standalone container for web_server, shaped like job-tracker: serves
/usaco/ with solved problems public and solving/skipped plus edits
(status, link, notes) for the site admin. Git is the only store: the
server clones adamf/usaco from Gitea, pulls on the push webhook, and
commits edits back. CI builds the image only when site/ changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:51:34 +01:00

27 lines
780 B
JavaScript

import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
import vue from "@vitejs/plugin-vue";
// The app is served under /usaco/ (BASE_PATH on the server), so every asset
// URL and the router's history base carry it. Changing one means changing both.
//
// `npm run dev` proxies the API to the Go server: VITE_PROXY_USACO (default
// localhost:8080, the standalone docker-compose).
export default defineConfig({
base: "/usaco/",
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
server: {
host: "0.0.0.0",
proxy: {
"/usaco/api": process.env.VITE_PROXY_USACO || "http://localhost:8080",
},
},
});