starfleet-ui
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#6 · main · 2 min 01 s
0Étoiles
0Forks
0Issues
| 1 | import tailwindcss from '@tailwindcss/vite'; |
| 2 | import adapter from '@sveltejs/adapter-bun'; |
| 3 | import { sveltekit } from '@sveltejs/kit/vite'; |
| 4 | import { defineConfig } from 'vite'; |
| 5 | |
| 6 | export default defineConfig({ |
| 7 | plugins: [ |
| 8 | tailwindcss(), |
| 9 | sveltekit({ |
| 10 | alias: { |
| 11 | $lib: './src/lib', |
| 12 | '$lib/*': './src/lib/*' |
| 13 | }, |
| 14 | compilerOptions: { |
| 15 | // Force runes mode for the project, except for libraries. Can be removed in svelte 6. |
| 16 | runes: ({ filename }) => |
| 17 | filename.split(/[/\\]/).includes('node_modules') ? undefined : true |
| 18 | }, |
| 19 | adapter: adapter({ |
| 20 | // Bun closes a connection idle for 10 s by default, but the game's event stream |
| 21 | // only sends a keepalive every 15 s: the captain's log would drop and reconnect |
| 22 | // constantly in production. 60 s (Bun's cap is 255; CONNECTION_IDLE_TIMEOUT overrides). |
| 23 | serverOptions: { idleTimeout: 60 } |
| 24 | }) |
| 25 | }) |
| 26 | ] |
| 27 | }); |