( err: RollupError, args: string[] = [], includeStack = true, )
| 23 | } |
| 24 | |
| 25 | export function buildErrorMessage( |
| 26 | err: RollupError, |
| 27 | args: string[] = [], |
| 28 | includeStack = true, |
| 29 | ): string { |
| 30 | if (err.plugin) args.push(` Plugin: ${colors.magenta(err.plugin)}`) |
| 31 | const loc = err.loc ? `:${err.loc.line}:${err.loc.column}` : '' |
| 32 | if (err.id) args.push(` File: ${colors.cyan(err.id)}${loc}`) |
| 33 | if (err.frame) args.push(colors.yellow(pad(err.frame))) |
| 34 | if (includeStack && err.stack) args.push(pad(cleanStack(err.stack))) |
| 35 | return args.join('\n') |
| 36 | } |
| 37 | |
| 38 | function cleanStack(stack: string) { |
| 39 | return stack |
no test coverage detected