I have a monorepo project setup with subpackages i manage.
Within these packages, some may depend on one or another within the same monorepo packages.
So, for example:
— Packages
Within the package.json of componentA, componentB is set as dependency but as “file://“
This is due the fact that if i change something in componentA and B, changes in B will be directly visible in A without publishing to the repository.
For development this works perfectly fine, but how does this work when i only want to use componentA in another webapp as dependency?
The other webapp does not need componentB as dependency, but only componentA.
How does componentA, which relies on componentB, installs componentB since it was declared as file dependency?
——
A solution would be to let componentA depend on componentB with a version number instead of a file reference.
The problem then will be that if i simultaneously working on A and B, changes on B wouldnt be directly visible in A unless i release the changes in B first.
——
Im using a monorepo setup with yarn and lerna.
Anyone familiar with this problem or are there any best practices for this?
Thanks in advance!