formatBuildErrors(error: unknown): string
Formats esbuild BuildFailure messages into clean human-readable text (no ANSI codes). When given a structured BuildFailure, each error is formatted with its file location and a caret line. Falls back to stripping ANSI codes from the error's string representation.
formatBuildErrors({ errors: [{ text: 'Could not resolve "x"', location: null, notes: [] }] }); // '[1] Could not resolve "x"' formatBuildErrors(new Error('boom')); // 'Error: boom'