Skip to content

Does not work properly with tsconfig.json with extends #240

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

justkey007
Copy link
Owner

Fixes #230

@justkey007 justkey007 merged commit 44d8c03 into master Apr 8, 2025
2 checks passed
@douglasgsouza
Copy link

douglasgsouza commented Apr 8, 2025

@justkey007 This seems to introduce a new issue:
tsc-alias error: compilerOptions.outDir is not set.

with config like:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "dist",
    "module": "CommonJS"
  }
}

where base tsconfig.json has no outdir defined.

Debug message:

tsc-alias --debug -p tsconfig.backend.json
tsc-alias debug: Loading config file: 'my-project/tsconfig.backend.json'
tsc-alias debug: configDir 'my-project'
tsc-alias debug: loaded config (from file): {
  baseUrl: './src',
  paths: { '@/*': [ '*', [length]: 1 ] },
  fileExtensions: {}
}
tsc-alias error: compilerOptions.outDir is not set

This does not occur in 1.8.13.
Could you check?

@heath-freenome
Copy link

heath-freenome commented Apr 9, 2025

@justkey007 More over, if you provide a non-standard filename, with the -p that has the .outDir in it and does NOT extends any other tsconfig.json file, while the base tsconfig.json file does not have it, it also fails. I'm guessing that the code you added loses track of the file provided by -p and starts looking in tsconfig.json instead.

@gustavo-yance-ikon
Copy link

Captura de pantalla 2025-04-10 a la(s) 9 21 37 a  m Somehow from this version seems all the paths are not being resolved after use tsc-alias. Ideas? Every other file seems to be fine. When I go back to 1.8.13 it works fine.

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 this pull request may close these issues.

Does not work properly with tsconfig.json with extends
4 participants