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

Using extends and specifyling baseUrl in base tsconfig does not resolve correctly #23

Closed
jonaskello opened this issue Jan 2, 2018 · 1 comment

Comments

@jonaskello
Copy link
Member

jonaskello commented Jan 2, 2018

I suspect there is a problem for baseUrl when using extends. For example:

/root/base-tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "."
  }
}

/root/dir1/tsconfig.json

{
  "extends": "../base-tsconfig.json",
  "compilerOptions": {
    "paths": {
      "foo/*": ["./foo/*"],
    }
  }
}

Now this line:

import * as Foo from "foo";

should try to import from /root/foo/index.ts because it should resolve baseUrl relative to the location of base-tsconfig.json. But I suspect it is trying to import from /root/dir1/foo/index.ts since we don't take into account the location of the base tsconfig and resolve baseUrl relative to that.

@jonaskello
Copy link
Member Author

Resolved in 2.7.0.

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

No branches or pull requests

1 participant