collin/mahjong
82287db9c0f56beec27f127645ba58fc3e20c3bc / vite.config.ts
| 1 | import { defineConfig } from 'vite' |
| 2 | import react from '@vitejs/plugin-react' |
| 3 | |
| 4 | // https://vite.dev/config/ |
| 5 | export default defineConfig({ |
| 6 | plugins: [react()], |
| 7 | // Served from wherever antics puts the bundle, not from a domain root — so |
| 8 | // every built URL has to be relative to the page. |
| 9 | base: './', |
| 10 | // portless hands us PORT/HOST; vite doesn't read them on its own |
| 11 | server: { |
| 12 | port: process.env.PORT ? Number(process.env.PORT) : undefined, |
| 13 | host: process.env.HOST || undefined, |
| 14 | }, |
| 15 | }) |