Yes, you need to do a few things, some of which is documented here:
npm install source-map-support
Enable sourceMap
in tsconfig.json
(not package.json!) by adding:
"compilerOptions": {
"sourceMap": true,
...
},
- Import the library into your file
- If you're using ES6 modules:
import 'source-map-support/register'
- If you're using commonJS modules:
require('source-map-support').install();
the result would transform this:
TypeError: Cannot read property 'current_location' of null
at /user_code/lib/http_actions.js:173:74
at next (native)
at fulfilled (/user_code/lib/http_actions.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
into this:
TypeError: Cannot read property 'current_location' of null
at /user_code/src/http_actions.ts:183:33
at next (native)
at fulfilled (/user_code/lib/http_actions.js:4:58)
at process._tickDomainCallback (internal/process/next_tick.js:135:7)