Skip to content

Commit

Permalink
Replace React with Preact
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Dec 5, 2023
1 parent d3d9333 commit 19d80b8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"clsx": "^2.0.0",
"country-code-to-flag-emoji": "^1.3.1",
"get-user-locale": "^2.3.0",
"preact": "^10.19.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
12 changes: 12 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ export default defineConfig({
minify: true,
}),
],
resolve: {
alias: [
{
find: 'react',
replacement: 'preact/compat',
},
{
find: 'react-dom',
replacement: 'preact/compat',
},
],
},
});
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3784,6 +3784,13 @@ __metadata:
languageName: node
linkType: hard

"preact@npm:^10.19.0":
version: 10.19.2
resolution: "preact@npm:10.19.2"
checksum: 1a37e967d8947d1c82ad86cd90968536612c1463effdc5b0230a4517dc928cae8c9052513f0d5ac7bb09480b9431d129197d6c9b6924d32e32245e5ecd27cc8a
languageName: node
linkType: hard

"prelude-ls@npm:^1.2.1":
version: 1.2.1
resolution: "prelude-ls@npm:1.2.1"
Expand Down Expand Up @@ -3887,6 +3894,7 @@ __metadata:
get-user-locale: "npm:^2.3.0"
husky: "npm:^8.0.0"
lint-staged: "npm:^14.0.0"
preact: "npm:^10.19.0"
prettier: "npm:^3.0.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
Expand Down

0 comments on commit 19d80b8

Please sign in to comment.