Closed KevinSchiener closed 9 months ago
Hi @KevinSchiener dependency-cruiser currently directly supports one tsconfig.json
. Supporting multiple ones at the same time is a future feature. It'll likely need a meaty chunk of time to implement correctly (and make it work with reasonable speed).
There are workarounds, but they will require some manual work.
Related: https://github.com/sverweij/dependency-cruiser/issues/565
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@sverweij Thanks for the reply. Hadn't gotten around to the issue for a while.
Summary
I get
error not-to-unresolvable
when running in a monorepo where the packages have individual path mappings in theirtsconfig.json
.Can I configure dependency-cruiser to pick up the package
tsconfig.json
when running from the workspace root?Context
I have a yarn workspaces monorepo with different packages in
/packages/
and/apps/
. Some packages define path maps in their respectivetsconfig.json
.Example:
These mappings are not picked up by dependency-cruiser when running from the repository root and will result in errors like:
error not-to-unresolvable: package/A/src/pages/Dashboard/Dashboard.tsx → @/hooks/use-pageTitle
It only works if I run dependency-cruiser from the
/packages/A
folder directly. My guess is that it only picks up thetsconfig.json
from the current working directory.I only have a
.dependency-cruiser.js
in the root.Is there a way to have it pick up the configs of each subfolder respectively?
Environment