Is there a way to get this to work with other peer dependencies? It works great when it's just react, but I have several peer dependencies (such as react-redux) which is causing conflicts. I've been messing around with this a lot and I'm having trouble getting it to work.
You tried to do the same trick described in the article for react (linked module dependency directly into your host app) ? I agree this is a bit messy. You can use yarn v2 to fix this problem (I guess). See Maël Nison's comment on this article. He explains how it works in yarn v2 and where you can install this new version 👍
Oh that's a better solution, thanks. I'd use that but my team uses NPM. I ended up just installing the peer dependencies for our library into peer_deps/node_modules so it's not picked up by the app but can still be used by the library during development.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there a way to get this to work with other peer dependencies? It works great when it's just
react
, but I have several peer dependencies (such asreact-redux
) which is causing conflicts. I've been messing around with this a lot and I'm having trouble getting it to work.You tried to do the same trick described in the article for
react
(linked module dependency directly into your host app) ? I agree this is a bit messy. You can use yarn v2 to fix this problem (I guess). See Maël Nison's comment on this article. He explains how it works in yarn v2 and where you can install this new version 👍Oh that's a better solution, thanks. I'd use that but my team uses NPM. I ended up just installing the peer dependencies for our library into
peer_deps/node_modules
so it's not picked up by the app but can still be used by the library during development.