Reproduction
mini repo:
import consola from "consola";
function trigger() {
const message = '666'
throw new Error(message)
}
try {
trigger()
} catch (e) {
consola.error(e)
}
output:
PS D:\shulaoda\consola-repo> node .\index.js
ERROR 666 08:46:56
123
123
at trigger (/consola-repo/index.js:5:11)
at /consola-repo/index.js:9:5
at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)
Describe the bug
Related to rolldown/rolldown#3828
This issue only occurs when the error message contains a newline character (\n).
Reproduction
mini repo:
output:
Describe the bug
Related to rolldown/rolldown#3828
This issue only occurs when the error message contains a newline character (
\n).