import react from '@vitejs/plugin-react' import { defineConfig } from 'vite' // https://vite.dev/config/ export default defineConfig({ plugins: [react()], // Relative asset URLs, so the app works under any path prefix (e.g. /website/). base: './', server: { // Forward API requests (including the websocket) to a locally running game // server, stripping the prefix like the production reverse proxy does. proxy: { '/api': { target: process.env.WIZARD_SERVER_URL ?? 'http://localhost:8000', ws: true, rewrite: (path) => path.replace(/^\/api/, ''), }, }, }, })