Closed damonmaria closed 5 years ago
react-hot-loader
is used in some of the components as a prod dependency to test component types. Presumably because the RHL proxies the component types during dev which breaks ===
comparison.
Yes, exactly, this code was added intentionally to fix hot loader usage for some people because class type comparison didn't work in their case. It's not perfect (I think it depends on them having the same version?) but it did seem to fix the problem for a number of people and the cost of having this being a production dependency was small.
I spent a good few hours just now figuring out why my shiny new Webpack 5 HMR and modern React Fast Refresh (react-refresh
) hot reloading wasn't working...
Deep debugging inside the React fiber rendering, I discovered something...
Wha? A react-hot-loader
Proxy! used by react-timeseries-charts
...
An actual dependency on this development library is certainly unexpected!
Some search terms to help others find this so they don't have to spend as much time as I did: [HMR] Updated modules but no changes applied scheduleFibersWithFamiliesRecursively not applying updates react-refresh performReactRefresh does nothing
Good times
🐛Bug report
Describe the bug This package includes
react-hot-loader
as a dependency, rather than devDependency.To Reproduce Install package.
Expected behavior
react-hot-loader
should not be included when I use this package.