From 746528f6abffbf7407878b49f82383f432814ffa Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 6 Jan 2026 13:35:32 -0800 Subject: [PATCH] fix: use Bun.serve() for proper HTMLBundle handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch to explicit Bun.serve() call - Add route handler for static files since 'static' prop not in types yet 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/dev/server.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/dev/server.tsx b/src/dev/server.tsx index 173f591..6b29d81 100644 --- a/src/dev/server.tsx +++ b/src/dev/server.tsx @@ -1,12 +1,20 @@ #!/usr/bin/env bun import index from "./index.html" -export default { +Bun.serve({ port: 3000, routes: { "/": index, + "/public/*": async (req) => { + const path = new URL(req.url).pathname.replace("/public/", "") + const file = Bun.file(`./public/${path}`) + if (await file.exists()) { + return new Response(file) + } + return new Response("Not found", { status: 404 }) + }, }, - static: { - "/public": "./public", - }, -} + development: true, +}) + +console.log("Dev server running at http://localhost:3000")