diff --git a/demo/plugins/ssr/ssr-environment.js b/demo/plugins/ssr/ssr-environment.js
index 10c349c4e..023dbec93 100644
--- a/demo/plugins/ssr/ssr-environment.js
+++ b/demo/plugins/ssr/ssr-environment.js
@@ -103,10 +103,10 @@ function finish({ url, res }, result) {
}
res.setHeader('Link', scripts.map(script => `<${script.url}>;rel=preload;as=script;crossorigin`).join(', '));
- for (const script of scripts) {
- // head += ``;
- body += ``;
- }
+ // for (const script of scripts) {
+ // // head += ``;
+ // body += ``;
+ // }
if (/<\/head>/i.test(result)) result = result.replace(/(<\/head>)/i, head + '$1');
else result = head + result;
diff --git a/demo/public/index.tsx b/demo/public/app.tsx
similarity index 100%
rename from demo/public/index.tsx
rename to demo/public/app.tsx
diff --git a/demo/public/document.tsx b/demo/public/document.tsx
new file mode 100644
index 000000000..3431e1d08
--- /dev/null
+++ b/demo/public/document.tsx
@@ -0,0 +1,58 @@
+import { App } from './app';
+import { Hydratable } from './hydrateable';
+import { HydrationContextProvider, useHydrationRegistrations } from './with-hydration';
+
+function importAlias(componentId: string): string {
+ return `Component_${componentId}`;
+}
+
+function HydrationScripts() {
+ const components = useHydrationRegistrations();
+
+ if (!components || components.length === 0) {
+ return null;
+ }
+
+ return (
+
-
-
-
-
-
-
-