Skip to content

Commit

Permalink
Fix intellisense issue not picking up path alias in test files
Browse files Browse the repository at this point in the history
Create a separate build tsconfig for building purposes and keep the tests file in the main tsconfig
  • Loading branch information
mderazon committed Jan 2, 2025
1 parent 5ec5282 commit a24ff65
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dist"
],
"scripts": {
"build": "tsc",
"build": "tsc --project tsconfig.build.json",
"test": "tsx --test --experimental-test-coverage --enable-source-maps test/**/*.spec.ts"
},
"repository": {
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "."
},
"include": ["lib/**/*"],
"exclude": ["node_modules", "dist", "test/**/*"]
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"@lib": ["lib/index"]
}
},
"include": ["lib/**/*"],
"exclude": ["node_modules", "dist", "test/**/*"]
"include": ["lib/**/*", "test/**/*"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit a24ff65

Please sign in to comment.