You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working in a mono repo, you can import packages from the node_modules which are used by other packages within the mono repo, but not listed in the dependency list of the package you are working in. It might be nice to give the user a heads up to include the dependency in their dependency list too.
As both package a & b use react, the react is installed in the root node_modules, thus allowing it to be imported by package c too. When react is also used in the source code of package c, it should be listed in the dependency or dev dependency list
The text was updated successfully, but these errors were encountered:
That's a cool idea, but I'm not sure how we could reliably detect if another package is using a dependency that isn't specified in its own dependencies / devDependencies. At a first glance, we would have to analyze the source code for all packages to detect any import statements, which might be expensive.
Summary
When working in a mono repo, you can import packages from the node_modules which are used by other packages within the mono repo, but not listed in the dependency list of the package you are working in. It might be nice to give the user a heads up to include the dependency in their dependency list too.
Example
As both package a & b use react, the react is installed in the root node_modules, thus allowing it to be imported by package c too. When react is also used in the source code of package c, it should be listed in the dependency or dev dependency list
The text was updated successfully, but these errors were encountered: