Update Hydration and HMR logic

This commit is contained in:
2026-03-23 06:13:25 +01:00
parent 1634eeb213
commit 0308ea32ec
21 changed files with 490 additions and 96 deletions
@@ -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";
type Params = {
req: Request;
};
@@ -39,6 +40,8 @@ export default async function bunextRequestHandler({
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 });
} else if (url.pathname.startsWith("/public/")) {