hot-loader / react-dom

🔥 version of React-DOM
110 stars 11 forks source link

Peer dependencies do not allow patch versions of react-dom #45

Open JakeSidSmith opened 3 years ago

JakeSidSmith commented 3 years ago

Am I correct in thinking that this package is automatically published when new versions of react/react-dom are released?

Currently react is on version 17.0.1, but there is only a 17.0.0 version of @hot-loader/react-dom, and since the peer dependency on react is strict, you get a warning when installing this package (if using the latest react):

npm WARN @hot-loader/react-dom@17.0.0 requires a peer of react@17.0.0 but none is installed. You must install peer dependencies yourself.

Is there a specific reason the peer dependency is so strict? Could this be loosened?

theKashey commented 3 years ago

Am I correct in thinking that this package is automatically published when new versions of react/react-dom are released?

Not quite. It's still manual releases and 17.0.1 was released just now 🚀

JakeSidSmith commented 3 years ago

Is it totally necessary to release a new version for every patch? Surely you'd save a lot of effort by loosening the peer?

theKashey commented 3 years ago

That is not under my control. But you don't have to use this library at all, as long as it just applies react-hot-loader "patch" to react. You can do the same via webpack loader.

Another good option is to stop using deprecated React-Hot-Loader and switch to FastRefresh. This time it will not require any extra hack for living.

JakeSidSmith commented 3 years ago

Thanks, I had no idea there was an alternative. I'll have a look. 😊

G-Rath commented 3 years ago

@theKashey fyi react 17.0.2 was released, so we need a new bump :)

deadcoder0904 commented 3 years ago

@theKashey yep, a new release is appreciated. I can't do npm i without adding --legacy-peer-deps.