Skip to content

Commit 34cb651

Browse files
test: add case for resolving paths from an extended tsconfig (#166)
Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com>
1 parent 2d187b9 commit 34cb651

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The focal point of this case is to ensure that the `paths` are resolved correctly when a project extends another project that has `paths` defined in its `compilerOptions`.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"root": "./my-app"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { message } from '@/message'
2+
3+
console.log(message)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const message = 'Hello world'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"include": ["./"]
4+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"module": "esnext",
4+
"moduleResolution": "bundler",
5+
"skipLibCheck": true,
6+
"paths": {
7+
"@/*": ["./my-app/*"]
8+
}
9+
},
10+
"include": [],
11+
"references": [{ "path": "./my-app/" }]
12+
}

0 commit comments

Comments
 (0)