Skip to content

Commit 1d571f9

Browse files
committed
add reproduction
1 parent 28d7b38 commit 1d571f9

File tree

6 files changed

+301
-0
lines changed

6 files changed

+301
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import parse from 'html-react-parser';
2+
3+
const parsed = parse('<b>yolo</b>');
4+
5+
console.log(parsed);

package-lock.json

+249
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "workshop",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"dependencies": {
7+
"html-react-parser": "^4.0.0",
8+
"react": "^18.2.0",
9+
"react-dom": "^18.2.0"
10+
},
11+
"devDependencies": {
12+
"@types/react": "^18.0.27",
13+
"@types/react-dom": "^18.0.10",
14+
"typescript": "^4.9.3"
15+
}
16+
}

tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"useDefineForClassFields": true,
5+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
6+
"allowJs": false,
7+
"skipLibCheck": true,
8+
"esModuleInterop": true,
9+
"allowSyntheticDefaultImports": true,
10+
"strict": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"module": "ESNext",
13+
"moduleResolution": "nodenext",
14+
"resolveJsonModule": true,
15+
"isolatedModules": true,
16+
"noEmit": true,
17+
"jsx": "react-jsx"
18+
},
19+
"include": ["."],
20+
"references": [{ "path": "./tsconfig.node.json" }]
21+
}

tsconfig.node.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"module": "ESNext",
5+
"moduleResolution": "Node",
6+
"allowSyntheticDefaultImports": true
7+
},
8+
"include": ["vite.config.ts"]
9+
}

0 commit comments

Comments
 (0)