Turns out you can just use Preact...

This commit is contained in:
Atridad Lahiji 2023-06-03 01:35:40 -06:00
parent b38c2528fa
commit a2ac8da817
No known key found for this signature in database
3 changed files with 15 additions and 0 deletions

View file

@ -24,6 +24,17 @@ const config = {
images: {
domains: ["avatars.githubusercontent.com", "lh3.googleusercontent.com"],
},
webpack: (config, { dev, isServer }) => {
if (!dev && !isServer) {
Object.assign(config.resolve.alias, {
"react/jsx-runtime.js": "preact/compat/jsx-runtime",
react: "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat",
});
}
return config;
},
};
const nextConfig = withPWA({
dest: "public",

View file

@ -29,6 +29,7 @@
"next": "^13.4.4",
"next-auth": "^4.22.1",
"postcss": "^8.4.24",
"preact": "^10.15.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.9.0",

3
pnpm-lock.yaml generated
View file

@ -53,6 +53,9 @@ dependencies:
postcss:
specifier: ^8.4.24
version: 8.4.24
preact:
specifier: ^10.15.1
version: 10.15.1
react:
specifier: 18.2.0
version: 18.2.0