Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple default lookups for projects with JS and TS usage #89

Closed
NikhilVerma opened this issue May 14, 2020 · 2 comments · Fixed by #91
Closed

Allow multiple default lookups for projects with JS and TS usage #89

NikhilVerma opened this issue May 14, 2020 · 2 comments · Fixed by #91

Comments

@NikhilVerma
Copy link

NikhilVerma commented May 14, 2020

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:

const defaultLookups = {

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.

@mrjoelkemp
Copy link
Collaborator

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!

@pastak
Copy link
Contributor

pastak commented Oct 5, 2020

Hi, @mrjoelkemp , I faced the same issue and make PR to fix it #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants