Using Preact? #4211
Replies: 2 comments 3 replies
-
Hi, I'm not very familiar with Preact but it's definitively something we'd like to support, as the docs sites generally don't need the most advanced features of React. Not sure what should be done exactly but as we do SSR and import React in core, we may need more than just babel aliases.
I'm aware of this and want to improve, but keep in mind that the perceived performance is not bad, almost everything on a Docusaurus site works even before the JS is downloaded. |
Beta Was this translation helpful? Give feedback.
-
Hey @slorber! Just wanted to share my experience with this. I recently reviewed Preact for SVGO.dev, and the results look promising so we're likely going to adopt it. I have a PR with the steps we took to get it working. (With help from a maintainer of Preact.)
However, would you be willing to chime in on the Preact discussion? We encountered an issue where by migrating to Preact, SSR broke, the output was a CSR application. It seemed to have been caused by a few lines in If you have any insight on this, I think it'd be valuable if you could share it! It'd especially be cool if something could be done to avoid the need to patch the package for Preact support. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So, I want to use the Preact compat layer because it's smaller and my docs website already gets like a 50 perf score on lighthouse so I used babel-plugin-module-resolver to alias it but it seems Docusaurus/Webpack is still adding it to the final bundle lowering the perf score by a lot. Is there any other way to do this that is faster?
Beta Was this translation helpful? Give feedback.
All reactions