Created
April 21, 2021 17:33
-
-
Save bobbyg603/d6793bb8408d2b97a9e08f7a509dbb6d to your computer and use it in GitHub Desktop.
Load TypeScript source maps at runtime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @bobbyg603 | |
// 04-21-2021 | |
// bugsplat.com | |
import { StackConverter } from '@bugsplat/stack-converter'; | |
(async () => { | |
try { | |
crash(); | |
} catch(error) { | |
console.log(error.stack) | |
const converter = await StackConverter.createFromDirectory('.'); | |
const result = await converter.convert(error.stack); | |
console.log(result.stack); | |
} | |
})(); | |
function crash() { | |
throw new Error('BugSplat rocks!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment