yarn ts-node ./index.ts
There are actually two things configured here:
-
tsconfig.json
compilerOptions.paths
This setting allows you to configure the desired path aliases. This makes the typescript compiler happy. -
tsconfig.json
ts-node
This makes the above actually work when usingts-node
.