Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.0.0-rc.2 no longer working with Gatsby #1921

Closed
thomkrupa opened this issue Sep 10, 2019 · 7 comments · Fixed by #1925
Closed

10.0.0-rc.2 no longer working with Gatsby #1921

thomkrupa opened this issue Sep 10, 2019 · 7 comments · Fixed by #1925

Comments

@thomkrupa
Copy link

Hey,

I updated preact to the latest version (from rc.1) in my gatsby project, and a very weird thing happened. There are no errors during the build nor the runtime, but yet the app doesn't re-render fully during the routing for some reason.

So if I click on a link, I go to /page-2/ but the content doesn't update.

Here is the demo:

please click on Go to page 2 and see what's happening - on the rc.1 everything works just fine. On the rc.2 URL is updating, but the content does not.

I have no idea how to further debug this issue, so any help would be much appreciated. Thank you!

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Sep 10, 2019

Hey, this has been fixed on master. We'll release a new version asap since it fixes your issue (which is pretty critical)

Thanks for the good issue report.

Fixed by: #1917

@JoviDeCroock
Copy link
Member

We've published rc.3 with the fix!

@thomkrupa
Copy link
Author

@JoviDeCroock I updated preact to rc.3 and seems it didn't fix the issue.
demo: https://preact-10-0-0-rc-3--youthful-jones-c0352b.netlify.com/

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Sep 10, 2019

It does work in gatsby develop right? Because I pulled in your repository and ran yarn dev and it worked

When I build and serve the production statically optimised build however it fails... This is quite odd

@JoviDeCroock JoviDeCroock reopened this Sep 10, 2019
@thomkrupa
Copy link
Author

@JoviDeCroock gatsby-plugin-preact uses react in dev mode. React is aliased to preact only for production. (source: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-preact/src/gatsby-node.js).

@JoviDeCroock
Copy link
Member

Yes found out as well, I found the fix that works with the production mode. PR'ed it now, this will probably need some discussion tomorrow with some fellow team-members but we'll tackle your issue asap.

@thomkrupa
Copy link
Author

Thank you! Really appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants