Skip to content

Commit 7c64c9c

Browse files
authored
Merge pull request #56 from takurinton/update-preact-and-fix-type-error
Update version preact
2 parents 830a26f + ad2ba1d commit 7c64c9c

File tree

4 files changed

+20
-384
lines changed

4 files changed

+20
-384
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
"@typescript-eslint/parser": "5.48.0",
2020
"eslint": "8.31.0",
2121
"eslint-config-preact": "1.3.0",
22-
"typescript": "4.9.3",
22+
"typescript": "4.9.4",
2323
"wmr": "3.8.0"
2424
},
2525
"dependencies": {
2626
"hoofd": "^1.2.2",
27-
"jsdom": "^20.0.1",
2827
"marked": "4.2.5",
29-
"preact": "10.11.0",
28+
"preact": "^10.11.3",
3029
"preact-iso": "^2.3.1"
3130
},
3231
"author": "takurinton",

public/prerender.tsx

-11
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@ import { prerender as ssr } from "preact-iso";
22
import { VNode } from "preact";
33
import { toStatic } from "hoofd/preact";
44

5-
let initialized = false;
6-
async function init() {
7-
// eslint-disable-next-line no-undef
8-
globalThis.DOMParser = new (require("jsdom").JSDOM)("").window.DOMParser;
9-
}
10-
115
export async function prerender(vnode: VNode) {
12-
if (!initialized) {
13-
initialized = true;
14-
await init();
15-
}
16-
176
const res = await ssr(vnode);
187

198
const head = toStatic();

tsconfig.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"jsx": "react",
88
"jsxFactory": "h",
99
"lib": ["ES2022"],
10-
"noEmit": true
10+
"noEmit": true,
11+
"skipLibCheck": true
1112
},
12-
"include": ["**/*.ts", "**/*.tsx"]
13+
"include": ["./**/*.ts", "./**/*.tsx"],
14+
"exclude": ["node_modules", "dist"]
1315
}

0 commit comments

Comments
 (0)