-
Notifications
You must be signed in to change notification settings - Fork 792
Description
Description
If a React module depends on a module that is not a React component and the non-React module is updated, the code is hot reloaded but the React module does not use the updated non-React module. This was working in v3 and seems like it should work automatically when using ES2015 modules.
Expected behavior
The React module should use the updated non-React module.
This was working as expected with [email protected]
.
Actual behavior
The React module continues to use the old non-React module.
Environment
React Hot Loader version: 4.1.2
, 4.3.0+
Irrelevant version info
1. `node -v`: 10.15.1 2. `npm -v`: 6.4.1And
- Operating system: Windows 10
- Browser and version: Chrome 72
Reproducible Demo
https://github.com/nwoltman/rhl-bug-repro
Follow the instructions in the README. When you modify the sanitizeEmail
function, the console shows that HMR worked, but when you type in the text input on the page, it seems to still be using the old sanitizeEmail
function.
If you change the react-hot-loader
version in package.json
to 3.1.3
(and uncomment 'react-hot-loader/patch'
in webpack.config.js
)4.2.0
(this bug was temporarily patched in that version), it works as expected.