skip dist artifacts and Node internals in CLI error traces

This commit is contained in:
Pooya Parsa 2017-08-12 20:41:36 +04:30
parent 18b6eb5b56
commit 15f9994928

View File

@ -7,6 +7,15 @@ const pe = PrettyError.start()
pe.skipPackage('regenerator-runtime')
pe.skipPackage('babel-runtime')
pe.skipPackage('core-js')
// Skip dist artifacts and Node internals
const skipFiles = [ 'nuxt.js', 'core.js' ]
pe.skip((traceLine, lineNumber) => {
if (!traceLine.file || skipFiles.indexOf(traceLine.file) !== -1) {
return true
}
})
pe.skipNodeFiles()
// Console error unhandled promises