-
Notifications
You must be signed in to change notification settings - Fork 27k
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
preact example not working #1006
Comments
I think this is happening because Next.js is using a babel plugin to explicitly alias react imports: https://github.com/zeit/next.js/blob/ddd93e9865fe3b05ca5d8d473650c8265f3fb5c3/server/build/webpack.js#L176-L178 If I'm understanding correctly, it seems like the server is rendering with React and the client is trying to continue with Preact. If I remove those lines from Next.js the Preact example runs without error. |
That was added in #963. @timneutkens what do you think? |
There is a PR for preact here #767 . But it isn't gonna be merged soon. |
just checked with latest version |
https://github.com/zeit/next.js/tree/master/examples/using-preact
Initially its rendering the content and immediately removing it from DOM. Same happening on every page refresh. No errors on browser console or terminal.
The text was updated successfully, but these errors were encountered: