What I try to do: Use some TS code somewhere in my project tree as a library by referring it by a paths mapping.
It seems that path resolution goes wrong when a paths reference does not stem from the project dir (where tsconfig.json is), e.g. has a .. in it.
Like this:
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@lib/*": ["./../lib/src/*"]
},
"outDir": "./dist",
In this case, the resolved path has one .. too much.
This also holds when shifting the baseUrl up:
"compilerOptions": {
"baseUrl": "./../",
"paths": {
"@lib/*": ["./lib/src/*"]
},
"outDir": "./dist",