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

Update Preact Example #1374

Closed
kurtextrem opened this issue Mar 9, 2017 · 5 comments
Closed

Update Preact Example #1374

kurtextrem opened this issue Mar 9, 2017 · 5 comments

Comments

@kurtextrem
Copy link

kurtextrem commented Mar 9, 2017

Preact supports hot loading: https://github.com/developit/zero-to-preact/commits/master

(It seems to work anyway. I just removed React from the using-preact example and HMR still does its thing)

@kurtextrem
Copy link
Author

Also using-preact is missing a .babelrc file (which is mentioned in the readme).

@lukeed
Copy link
Contributor

lukeed commented Mar 19, 2017

The .babelrc isn't needed anymore. React is dropped via module-alias + the next.config.js changes.

@jgoux
Copy link

jgoux commented May 15, 2017

Hello,

@kurtextrem I just tried using preact + next.js, but removing all the conditional if (dev) give me this error :

This module was not found:
* react-dom/lib/ReactReconciler in ./~/next/dist/client/next-dev.js

Here is a gist of all my files : https://gist.github.com/jgoux/e188f17f0b121684b3a6bbc0189e0cb5

What did I miss ?

@lukeed
Copy link
Contributor

lukeed commented May 15, 2017

@jgoux You're missing react-dom. Next.js still requires a React environment in order to build & develop. As pointed out in #1564, the final output actually still includes React in the client bundle.

@jgoux
Copy link

jgoux commented May 15, 2017

Oh I miss this one, thanks for the quick reply @lukeed ! 👍

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants