I have a React/Redux typescript project A. My team decided to split out some of the React components and Redux code into an NPM module, so I created another React/Redux TS project B.
Initially, when I tried to install B from A, I got errors due to type redeclarations, since both A and B depend on the same type declarations files (react, redux, etc). So I moved all of B's @types dependencies to be peer dependencies. This allows me to properly install B from A.
However, for development purposes, I would like to npm link
to B from A, so I don't constantly have to recompile and reinstall B. But because npm link
creates a symlink, it points to the entire B project, including the type definitions that I need to avoid.
Does anyone know how to solve this conundrum?