Skip to content

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

@mareolan

Description

@mareolan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions