Skip to content

Commit a6d1afd

Browse files
committed
improve preact integration
1 parent 04b2c29 commit a6d1afd

File tree

4 files changed

+40
-62
lines changed

4 files changed

+40
-62
lines changed

package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,14 @@
1212
"dependencies": {
1313
"@ionic/react": "^7.8.6",
1414
"@ionic/react-router": "^7.8.6",
15-
"@types/react-router": "^5.1.20",
16-
"@types/react-router-dom": "^5.3.3",
1715
"ionicons": "^7.4.0",
1816
"preact": "^10.22.1",
19-
"react-dom": "^18.3.1",
20-
"react-router": "^5.3.4",
2117
"react-router-dom": "^5.3.4"
2218
},
2319
"devDependencies": {
2420
"@preact/preset-vite": "^2.8.3",
2521
"@types/react": "^18.3.3",
26-
"@types/react-dom": "^18.3.0",
22+
"@types/react-router-dom": "^5.3.3",
2723
"@vitejs/plugin-react": "^4.3.1",
2824
"concurrently": "^8.2.2",
2925
"prettier": "^3.3.2",

pnpm-lock.yaml

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

src/pages/Home.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ const Home: React.FC = () => {
1717
</IonToolbar>
1818
</IonHeader>
1919
<IonContent fullscreen>
20-
<IonHeader collapse="condense">
21-
<IonToolbar>
22-
<IonTitle size="large">Blank</IonTitle>
23-
</IonToolbar>
24-
</IonHeader>
2520
<ExploreContainer />
2621
</IonContent>
2722
</IonPage>

tsconfig.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
1616
"noEmit": true,
17-
"jsx": "react-jsx"
17+
"jsx": "react-jsx",
18+
"paths": {
19+
"react": ["./node_modules/preact/compat/"],
20+
"react/jsx-runtime": ["./node_modules/preact/jsx-runtime"],
21+
"react-dom": ["./node_modules/preact/compat/"],
22+
"react-dom/*": ["./node_modules/preact/compat/*"]
23+
}
1824
},
1925
"include": ["src"]
2026
}

0 commit comments

Comments
 (0)