Reputation: 20446
In my project, I have an /src
folder that contains .ts
files and I setup tsconfig.json
to compile those in a folder called /dist
into .js
and source map .js.map
.
Now I run the code using the commande node /dist/whatever.js
But Let's say there in a error. The error logs maps to the compiled .js
files.
How to make it map to the original
.ts
file ? I assume this is possible because that's the use of source map.
Upvotes: 0
Views: 1162
Reputation: 61
Happened to see this question. I didn't really use IntelliJ, but I have been using source-map-support to do the trick. You could either programmtically add import 'source-map-support/register';
, or invoke node CLI node -r source-map-support/register compiled.js
. Hope that helps.
Upvotes: 1
Reputation: 6734
I see you are using IntelliJ. You can exclude directories so they will not be indexed.
Upvotes: -1