This commit is contained in:
2026-03-23 07:42:00 +01:00
parent 567fb4f746
commit 4b8b610e32
43 changed files with 635 additions and 169 deletions
+4
View File
@@ -5,6 +5,7 @@ import grabConstants from "../../utils/grab-constants";
import handleHmr from "./handle-hmr";
import handlePublic from "./handle-public";
import handleFiles from "./handle-files";
import handleBunextPublicAssets from "./handle-bunext-public-assets";
export default async function bunextRequestHandler({ req: initial_req, }) {
const is_dev = isDevelopment();
let req = initial_req.clone();
@@ -27,6 +28,9 @@ export default async function bunextRequestHandler({ req: initial_req, }) {
if (url.pathname === "/__hmr" && is_dev) {
response = await handleHmr({ req });
}
else if (url.pathname.startsWith("/.bunext/public/pages")) {
response = await handleBunextPublicAssets({ req });
}
else if (url.pathname.startsWith("/api/")) {
response = await handleRoutes({ req });
}