import type { PreHydrateHook } from "@octanejs/vite-plugin"; import { getClientRouter } from "./router.client.ts"; // Commit the client router's match tree before hydration so the first render // adopts the same tree the server produced. const preHydrate: PreHydrateHook = async () => { await getClientRouter().load(); }; export default preHydrate;