-
-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Since typescript 5.5, it is possible to use the ${configDir} variable inside include
/exclude
clauses to reference the directory path where the current tsconfig is located, but unfortunately vite-tsconfig-paths does not support this feature yet, so path aliases are not set when using it.
Example
/* tsconfig.base.json */
{
"include": ["${configDir}/src"],
"exclude": ["${configDir}/dist", "${configDir}/node_modules"],
}
/* tsconfig.json */
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.vite.json"
}
]
}
/* tsconfig.app.json */
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"paths": {
"@components/*": [
"./src/components/*"
],
/* ... */
}
},
"include": [
"src"
]
}
If I remove the "include": ["src"]
at the end of tsconfig.app.json
, the path aliases stop working in vite, but it shouldn't since ${configDir)/src
expands to ./src
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed