File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
packages/next/src/server/app-render Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3618,7 +3618,18 @@ async function logMessagesAndSendErrorsToBrowser(
36183618
36193619 const errors : Error [ ] = [ ]
36203620 for ( const message of messages ) {
3621- console . error ( message )
3621+ // Log the error to the CLI. Prevent the logs from being dimmed, which we
3622+ // apply for other logs during the spawned validation.
3623+ consoleAsyncStorage . exit ( ( ) => {
3624+ console . error ( message )
3625+ } )
3626+
3627+ // Error instances are also sent to the browser. We're currently using a
3628+ // non-Error message only in debug build mode as a message that is only
3629+ // meant for the CLI. FIXME: This is a bit spooky action at a distance. We
3630+ // should maybe have a more explicit way of determining which messages
3631+ // should be sent to the browser. Regardless, only real errors with a proper
3632+ // stack make sense to be "replayed" in the browser.
36223633 if ( message instanceof Error ) {
36233634 errors . push ( message )
36243635 }
You can’t perform that action at this time.
0 commit comments