Files
lemonade/vite.config.ts
T
jcoffey-dev f2e084ef7a Split the site out, and offer the source the licence requires
The hub page and the games.jcoffey.dev deployment move to their own
private repository; this one keeps only the game, its leaderboard and a
generic compose that runs both anywhere. No deployment details remain
here, and no site references.

A SOURCE link now sits on every screen. AGPL section 13 entitles anyone
playing this over a network to the source of what they are playing, and
a link in the footer is how that offer gets made.
2026-09-08 17:34:51 -07:00

22 lines
722 B
TypeScript

import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
// https://vite.dev/config/
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 development that is the
// scores service on 5184, in production it is nginx in front of the
// container. Nothing in the client needs to know the difference.
proxy: {
'/api': {
target: process.env.SCORES_TARGET ?? 'http://localhost:5184',
changeOrigin: true,
},
},
},
})