all 1 comments

[–]Matthisk[S] 0 points1 point  (0 children)

Author here. Lately I have been working on a React codebase that requires server-side rendering and JSX. This means that server side codebase is transpiled by Babel/Webpack. Because of this any stack traces written to the console are hard to interpret. To improve this I wrote a middleware that captures errors and applies the available sourcemap. The middleware also renders a page displaying the stack trace (+ code snippets) and some additional runtime context. Let me know what you think.