Frequently asked questions / issues #110
raouldeheer
started this conversation in
General
Replies: 1 comment
-
For anyone facing this issue, the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Replaces path that shouldn't be replaced
This is probably because it's resolving to the baseUrl. This could be solved by adding a small config to tsconfig.json.
More info in issues: #71 #79 #103 #109
Why is this enabled by default?
"All module imports with non-relative names are assumed to be relative to the baseUrl." -typescript handbook
Therefore base-url is enabled by default.
Do I need to add a replacer?
No, you don't have to add a replacer. Adding an extra replacer to tsc-alias is optional.
Alias isn't replaced when target file isn't present
This happens because tsc-alias checks if the file exists, because if it doesn't it will use the next path in the array (in the tsconfig each path has an array of solutions).
But this problem can be easily fixed by adding dummy files so that the file exists and resolves.
Beta Was this translation helpful? Give feedback.
All reactions