- Creado nuevo proyecto Nuxt 4 con estructura app/ - Servidor Colyseus separado para evitar problemas con decoradores - Migrado GameRoom y toda la lógica del juego - Implementado cliente con composables useGameClient - Panel de administración funcional - Componentes Vue migrados (HomeScreen, GameScreen, PlayerCard, etc) - Configuración para ejecutar ambos servidores (npm run dev:all)
60 lines
1.1 KiB
TypeScript
60 lines
1.1 KiB
TypeScript
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
export default defineNuxtConfig({
|
|
future: {
|
|
compatibilityVersion: 4,
|
|
},
|
|
compatibilityDate: '2025-07-15',
|
|
devtools: { enabled: true },
|
|
|
|
// Configure server
|
|
nitro: {
|
|
experimental: {
|
|
websocket: true
|
|
},
|
|
// Enable WebSocket support
|
|
devProxy: {
|
|
'/ws': {
|
|
target: 'ws://localhost:3000',
|
|
ws: true,
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
|
|
// Environment variables
|
|
runtimeConfig: {
|
|
public: {
|
|
gameName: 'SnatchGame',
|
|
wsUrl: process.env.NUXT_PUBLIC_WS_URL || 'ws://localhost:2567'
|
|
}
|
|
},
|
|
|
|
// TypeScript configuration
|
|
typescript: {
|
|
strict: true,
|
|
shim: false,
|
|
tsConfig: {
|
|
compilerOptions: {
|
|
experimentalDecorators: true,
|
|
emitDecoratorMetadata: true
|
|
}
|
|
}
|
|
},
|
|
|
|
// Disable SSR for game application
|
|
ssr: false,
|
|
|
|
// Vite configuration for WebSocket support
|
|
vite: {
|
|
server: {
|
|
proxy: {
|
|
'/ws': {
|
|
target: 'ws://localhost:3000',
|
|
ws: true,
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|