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

baseUrl incorrectly resolved when tsconfig file not in working directory #12

Open
drumminj opened this issue Jun 28, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@drumminj
Copy link

drumminj commented Jun 28, 2020

If the project file (tsconfig.json) specified on the command line is in a directory other than the current working directory, non-relative path imports aren't correctly resolved.

baseUrl (and paths in tsconfig) are normally relative to the location of tsconfig.json. However, it appears the TypeScript API being called to parse the config file may be behaving differently, instead relying on the path provided to parseJsonConfigFileContent()

See: https://github.com/evolution-gaming/tsc-silent/blob/master/src/tsc-silent.ts#L114

A local change to instead pass path.dirname(argv.project) instead of process.cwd() appears to fix the issue.

@DaniruKun DaniruKun added the bug Something isn't working label Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants