Bugfix: hydration mismatch

This commit is contained in:
2026-04-08 07:46:09 +01:00
parent a84ac10b24
commit 6b7d29bc53
10 changed files with 192 additions and 175 deletions
+20
View File
@@ -56,6 +56,26 @@ export default async function genWebHTML({ component, pageProps, bundledMap, mod
},
});
const htmlBody = await new Response(stream).text();
// const originalConsole = {
// log: console.log,
// warn: console.warn,
// error: console.error,
// info: console.info,
// debug: console.debug,
// };
// console.log = () => {};
// console.warn = () => {};
// console.error = () => {};
// console.info = () => {};
// console.debug = () => {};
// const stream = await renderToReadableStream(final_component, {
// onError(error: any) {
// if (error.message.includes('unique "key" prop')) return;
// originalConsole.error(error);
// },
// });
// const htmlBody = await new Response(stream).text();
// Object.assign(console, originalConsole);
html += htmlBody;
return html;
}