Allow multiple default lookups for projects with JS and TS usage
NikhilVerma opened this issue · 2 comments
Our use case is that we have a monorepo with several projects, some of them are in Typescript and some in plain JS.
When we pass tsConfig
options (via madge) it fails to resolve modules written in JS because on the default lookups array:
Line 25 in b40961e
Only seems to have one lookup for each file extension, where as tsConfig can also resolve JS module via allowJs option.
This will make it significantly easier for project which are in the process of migration to Typescript.
Hi! Thanks for contributing. Do you have a more concrete example where this goes wrong? I don't use TS personally, so I could use more handholding on the problematic situation. An example repo or (even better) a failing test would be great.
Also, do you have a sense of the code changes to fix the issue?
Thanks!
Hi, @mrjoelkemp , I faced the same issue and make PR to fix it #91