Files
elysium/apps/web/vite.config.ts
T
hikari 3ff17bda84 feat: add about page with versions, changelog, and how-to-play
- New GET /about API endpoint caches Gitea releases for 5 minutes
- AboutPanel displays client version (via Vite define), API version, collapsible changelog, and How to Play guide
- GiteaRelease and AboutResponse types added to shared package
2026-03-06 23:16:50 -08:00

27 lines
568 B
TypeScript

import { readFileSync } from "node:fs";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
const { version: WEB_VERSION } = JSON.parse(
readFileSync("./package.json", "utf-8"),
) as { version: string };
export default defineConfig({
define: {
__WEB_VERSION__: JSON.stringify(WEB_VERSION),
},
plugins: [react()],
server: {
port: 5173,
proxy: {
"/api": {
target: "http://localhost:3001",
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
build: {
outDir: "dist",
},
});