sandoniette/vite.config.ts
type-two 4f4b31b914 Deploy to partly.party/sandoniette
- vite.config.ts: dev base '/', build base '/sandoniette/' (subpath deploy).
- Asset loads use import.meta.env.BASE_URL so paths resolve at the subpath
  regardless of trailing slash. vite-env.d.ts for the env types.
- deploy.sh: build -> rsync dist/ -> docker cp into forum-nginx web root
  /usr/share/nginx/html/sandoniette (matches the partly.party games pattern).
- Verified LIVE: index+JS 200, JS served as application/javascript (not the
  HTML-fallback failure), PNGs image/png, title screen renders in-browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 21:55:56 +10:00

8 lines
303 B
TypeScript

import { defineConfig } from 'vite';
// Dev serves at '/', the production build is rooted at '/sandoniette/' so it can
// live at partly.party/sandoniette/. Keep in sync with the deploy web root.
export default defineConfig(({ command }) => ({
base: command === 'build' ? '/sandoniette/' : '/',
}));