Migrate to Vite for proper production builds with code splitting and optimization
All checks were successful
Build and Push Frontend / build (push) Successful in 23s

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hector Ros
2026-01-20 01:47:14 +01:00
parent de0a0b8357
commit 391bb7e9a8
6 changed files with 242 additions and 9 deletions

View File

@@ -40,14 +40,14 @@ Bun.serve({
})
}
// Serve static files from public directory
const staticFile = Bun.file(`./public${url.pathname}`)
// Serve static files from dist directory (Vite build output)
const staticFile = Bun.file(`./dist${url.pathname}`)
if (await staticFile.exists()) {
return new Response(staticFile)
}
// For all other routes (SPA routing), serve index.html
const indexFile = Bun.file('./public/index.html')
const indexFile = Bun.file('./dist/index.html')
return new Response(indexFile, {
headers: {
'Content-Type': 'text/html',