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.
25 lines
974 B
TypeScript
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,
|
|
},
|
|
},
|
|
},
|
|
})
|