Files
Pac-Man/web/vite.config.ts
Xevion 5e86bbb040 feat(web): implement game lifecycle management for SPA navigation
Add stop_game and restart_game FFI functions to properly pause/resume the game loop during page transitions, preventing resource leaks and audio issues when navigating between pages
2025-12-29 02:06:15 -06:00

28 lines
689 B
TypeScript

import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import vike from "vike/plugin";
import { defineConfig } from "vite";
import path from "path";
export default defineConfig({
plugins: [vike(), react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "."),
},
},
build: {
target: "es2022",
},
server: {
// Proxy API requests to the backend server during local development
// In production, both frontend and API are served from the same origin
proxy: {
'/api': {
target: process.env.VITE_API_TARGET || 'http://localhost:3001',
changeOrigin: true,
},
},
},
});