Files
wumpus/vite.config.ts
T
jcoffey-dev ff4da7321c Point links at git.coffeylabs.org after the move from GitHub
GitHub took the organization's repos and GHCR offline on 2026-09-20. Repo,
release, raw-file and clone links now go to Gitea at git.coffeylabs.org,
container images to registry.coffeylabs.org, and GitLab-style /-/blob paths
to Gitea's /src/branch form. Go module paths are identifiers and stay as
they are; links to GitHub issues and pull requests are left as history.
2026-09-22 09:09:33 -07:00

25 lines
974 B
TypeScript

import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// Vitest is left on its defaults on purpose: it already picks up *.test.ts and
// nothing else, and importing `vitest/config` here drags in a second copy of
// vite whose plugin types disagree with this one's.
export default defineConfig({
// Asset URLs are baked in at build time, so this has to match the path the
// game is served from. Local development stays at the root.
base: process.env.BASE_PATH ?? '/',
plugins: [react()],
server: {
// The game talks to /api in every environment; in production that is
// nginx in front of the shared scores container. In development, run
// https://git.coffeylabs.org/jcoffey-dev/games-scores alongside this -- or do not,
// and the board will say so rather than breaking.
proxy: {
'/api': {
target: process.env.SCORES_TARGET ?? 'http://localhost:5184',
changeOrigin: true,
},
},
},
})