Skip to content

Inherited baseUrl is not respected #807

Open
@DanielRosenwasser

Description

@DanielRosenwasser
// @filename: src/tsconfig.json
{
  "extends": "../configs/tsconfig.base.json",
  "compilerOptions": {
    "target": "esnext",
    "module": "nodenext",
    "outDir": "../dist",
    "strict": true,
  },
  "include": ["**/*"],
}
// @filename: configs/tsconfig.base.json
{
    "compilerOptions": {
        "baseUrl": "../src",
        "paths": {
            "@/*": ["*"]
        }
    }
}
// @filename: a.ts
export const foo = 123;
// @filename: b.ts
import { foo } from "@/a.js";

foo + foo;
b.ts:1:21 - error TS2307: Cannot find module '@/a.js' or its corresponding type declarations.

1 import { foo } from "@/a.js";
                      ~~~~~~~~


Found 1 error in b.ts:1

Files:              84
Lines:           41514
Identifiers:     45336
Symbols:         40210
Types:           22379
Instantiations:  10412
Memory used:    43739K
Memory allocs:  326267
Parse time:     0.029s
Bind time:      0.007s
Check time:     0.110s
Emit time:      0.007s
Total time:     0.152s

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions