Skip to content

Commit bd73505

Browse files
committed
compat demo
1 parent e8be966 commit bd73505

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

debug.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[0312/171122.139:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)

demo/src/App.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ export function App({ head }) {
55
const Counter = lazy(
66
() =>
77
new Promise((res) => {
8-
setTimeout(() => {
9-
res(import('./Counter.jsx'));
10-
}, 3000);
8+
setTimeout(
9+
() => {
10+
res(import('./Counter.jsx'));
11+
},
12+
typeof document === 'undefined' ? 500 : 3000
13+
);
1114
})
1215
);
1316
return (

demo/src/Counter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useState } from 'preact/compat';
33

44
const Counter = () => {
55
const [count, setCount] = useState(0);
6-
6+
console.log('counter');
77
return (
88
<div style={{ display: 'flex' }}>
99
<button onClick={() => setCount(count - 1)}>-</button>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/chunked.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export async function renderToChunks(vnode, { context, onWrite, abortSignal }) {
2626
onWrite(shell);
2727
// Wait for any suspended sub-trees if there are any
2828
const len = renderer.suspended.length;
29+
console.log(renderer.suspended);
2930
if (len > 0) {
3031
onWrite('<div hidden>');
3132
onWrite(createInitScript(len));

0 commit comments

Comments
 (0)