import tailwindcss from '@tailwindcss/vite'; import adapter from '@sveltejs/adapter-bun'; import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ tailwindcss(), sveltekit({ alias: { $lib: './src/lib', '$lib/*': './src/lib/*' }, compilerOptions: { // Force runes mode for the project, except for libraries. Can be removed in svelte 6. runes: ({ filename }) => filename.split(/[/\\]/).includes('node_modules') ? undefined : true }, adapter: adapter({ // Bun closes a connection idle for 10 s by default, but the game's event stream // only sends a keepalive every 15 s: the captain's log would drop and reconnect // constantly in production. 60 s (Bun's cap is 255; CONNECTION_IDLE_TIMEOUT overrides). serverOptions: { idleTimeout: 60 } }) }) ] });