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
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user