dev: ansi-html stack tweaking

This commit is contained in:
bordun 2018-10-27 14:49:11 +02:00
parent 95c53ee70b
commit dcf587778f
3 changed files with 6 additions and 1 deletions

View file

@ -92,7 +92,7 @@ function bundle() {
'<div class="error-stack">' +
ansiHTML(
err.stack
.replace(/\n\s*at Parser.*/g, '') // remove useless stack
.replace(/^ at .*/gm, '') // remove useless stack
.replace(new RegExp(path.resolve(__dirname + '/..'), 'g'),'.') // shorten file path
.trim()
.replace('\n','\n\n') // add 1 new line after 1st line