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

tsconfig.json with extends not handled correctly #323

Closed
eelco opened this issue Aug 29, 2022 · 3 comments · Fixed by #349
Closed

tsconfig.json with extends not handled correctly #323

eelco opened this issue Aug 29, 2022 · 3 comments · Fixed by #349
Labels
Milestone

Comments

@eelco
Copy link

eelco commented Aug 29, 2022

When passing a tsconfig.json to --ts-config madge does not handle the extends field correctly.

It is calling all the “right” options to parse the file with TypeScript, but then ends up taking the raw field as the options:

config.tsConfig = obj.raw;

This is not correct. Compare to how filing-cabinet fixed the same issue: dependents/node-filing-cabinet#86 That code ends up using options for the processed compilerOptions, which is the result of merging in the options as configured via the file referred to with extends.

Found during debugging for this related issue: #322

@pedrolamas
Copy link

I've noticed this issue myself, only way so far I found of bypassing it is by creating a "merged" file and using that with madge:

npx tsc --showConfig -p ./tsconfig.app.json > tsconfig.merged.json

npx madge@latest --ts-config ./tsconfig.merged.json --warning --circular --extensions ts,vue,js ./src

@fdc-viktor-luft
Copy link
Collaborator

@kamiazya will this be possibly fixed in V6?

@kamiazya
Copy link
Collaborator

@fdc-viktor-luft
I will work on it, but it may take some time to debug.

I think the response is that it is not required in the v6 release, but will be included if it is ready in time.

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

Successfully merging a pull request may close this issue.

4 participants