Pixel Olympics is a Vite static site — build output goes to dist/. No server functions or environment variables.
| Setting | Value |
|---|---|
| Framework Preset | Vite (auto-detected from vite.config.js) |
| Build Command | pnpm build |
| Output Directory | dist |
| Install Command | pnpm install |
| Node.js | 20+ recommended |
Connect the GitHub repo Rixouu/pixel-olympics and deploy from main.
| Path (built) | Purpose |
|---|---|
dist/index.html |
App shell |
dist/assets/*.js |
Bundled game (engine, characters, scenes chunks) |
dist/assets/*.css |
Styles + font @font-face rules |
dist/fonts/*.woff2 |
Self-hosted Press Start 2P & Jersey 10 |
dist/favicon.*, og-image.png, install icons, etc. |
Copied from public/ |
dist/site.webmanifest |
Web app manifest |
dist/sw.js |
Service worker for cached shell assets |
Redirect helpers: public/derby-royale.html and public/pixel-olympics.html → /
https://pixel-olympics.vercel.app/
Optional alias: /play → / (rewrite in vercel.json)
corepack enable
pnpm install
pnpm dev # hot reload at http://localhost:5173
pnpm build # production bundle → dist/
pnpm preview # serve dist/ at http://localhost:4173- Vercel dashboard → Project → Settings → Domains
- Add your domain and update DNS per Vercel
- Update absolute Open Graph URLs in
index.htmlif needed
Production meta tags point to:
- Site:
https://pixel-olympics.vercel.app/ - Image:
https://pixel-olympics.vercel.app/og-image.png
The app also ships:
site.webmanifestsw.jsapple-touch-icon.pngandroid-chrome-192x192*.pngandroid-chrome-512x512*.png
These files are referenced from index.html, src/main.js, and public/sw.js, so keep their filenames stable unless you update the code too.
- Security headers on all routes
- Long cache on
public/assets (icons, fonts, OG image) - Immutable cache on hashed
/assets/*bundles - HTML/JS/CSS revalidate hourly
Vercel dashboard → Deployments → previous deployment → Promote to Production.
- Repo linked to Vercel with Vite preset
- Build succeeds (
pnpm buildlocally first) -
/loads the lobby - Fonts render (no Google Fonts network call)
- Manifest and service worker load without 404s
-
/derby-royale.htmlredirects to/ -
/pixel-olympics.htmlredirects to/ -
/playserves the game - Test on a phone via preview URL
| Issue | Fix |
|---|---|
| Build fails on Vercel | Run pnpm build locally; check Node 20+ and pnpm-lock.yaml is committed |
| Blank page | Browser console; verify dist/index.html references /assets/ |
| Fonts missing | Ensure public/fonts/*.woff2 exist and built to dist/fonts/ |
| Stale bundle after deploy | Hard refresh; hashed assets in /assets/ should bust cache |