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

Make patched UMD version (for use with external react-dom) #38

Open
mareolan opened this issue May 17, 2020 · 1 comment
Open

Make patched UMD version (for use with external react-dom) #38

mareolan opened this issue May 17, 2020 · 1 comment

Comments

@mareolan
Copy link

Current npm package 16.13.0 contains patched version of react-dom in CJS format only. There is actually also umd/react-dom.development.js file, but it contains unpatched version - there is difference in createFiberFromTypeAndProps function when compared with CJS version (it's missing type = hotResolveType(type);) and without that the application loading fails with AppContainer should be patched.

Having UMD build of @hot-loader/react-dom, or a script for applying the patch to the UMD build of react-dom, would make the hot reloading work in applications which load react and react-dom externally.

PS: the patch.js script referenced from README currently works only if applied to CJS version, probably because react-dom UMD build has extra indentation and the patch uses string.replace without regexps.

@theKashey
Copy link
Contributor

The ecosystem started slowly moving to the react-native implementation of hot reloading (fast-refresh), there are at least 3 different libraries implementing it, and I am not able to recommend any particular one.

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

No branches or pull requests

2 participants