Closed wojtekmaj closed 6 days ago
applying react-hot-loader/webpack loader to /node_modules\/react-dom/ only
Is a good idea. There is no need to apply any "hot" stuff on the "static" node_modules
Additionally, you can pass noRegister
option to webpack loader and it will skip the moment which is failing.
Is there any progress?
React-Hot-Loader is deprecated. There are newer variants based on FastRefresh compatible with wp5
@theKashey I see. Thank you!
@kahirokunn And also instructions for this deprecated package were updated to keep people from falling into this trap, see https://github.com/gaearon/react-hot-loader/pull/1452.
React-Hot-Loader is deprecated. There are newer variants based on FastRefresh compatible with wp5
but not support react 15.
Not sure why you use still React 15 (at least in dev mode). 16 is 100% backward compatible.
Note: This has also been reported in Webpack repo.
Description
I'm getting an error "ReferenceError: exports is not defined" when running the application that uses with
react-hot-loader
and importsd3-array
built with Wepack 5.0.0-beta.14 and up.Expected behavior
"Uncaught ReferenceError: exports is not defined" not to be thrown when executing Webpack-bundled code.
Actual behavior
Here's the exact error:
Any of the following seem to unbreak the app:
d3-array
import (duh)export default hot(Root)
->export default Root
react-hot-loader/webpack
loader to/node_modules\/react-dom/
only and not/node_modules/
Tested other versions of Webpack, changing absolutely nothing but the Webpack version, and here's my findings:
Environment
React Hot Loader version: 4.12.21
Run these commands in the project folder and fill in their results:
node -v
: 12.16.2npm -v
: 6.14.4Then, specify:
Reproducible Demo
Reproducible repo