Preact 8.x is incompatible with reach router and errors out on Gatsby v2 (see #8545). Preact X includes compat for contexts and other React 16 features needed by Gatsby, and has moved the compat module to core. This plugin should use that, even though it's currently in alpha, since the current implementation is broken.
Just a matter of updating alias refs from preact-compat to preact/compat and requiring a peer dep of preact ^10.0.0.
Use gatsby-plugin-preact with Preact 10 alpha
It should work
It doesn't
@seaneking as a preact core member, it's on my list to update the plugin and make sure Gatsby works. I'm a bit swamped with other priorities right now but feel free to pick this up.
@wardpeet great to hear! I tried using Preact X locally, but seems there's still incompatibilities with react router and contexts. So guess we'll have to wait for more bugs to be ironed out during the alpha
Hiya!
This issue has gone quiet. Spooky quiet. 馃懟
We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 馃挭馃挏
I think this should be kept open until Preact X is compatible with Reach router (and therefore Gatsby) and can be used again with this plugin. The beta rewrite may have fixed the issues I saw last time I tried, will try again when I get a chance.
Most helpful comment
@seaneking as a preact core member, it's on my list to update the plugin and make sure Gatsby works. I'm a bit swamped with other priorities right now but feel free to pick this up.