Drain worker stderr before process.exit in export/worker.ts
When the export worker calls process.exit(1) during prerenderEarlyExit
or on uncaught dynamic API errors, subsequent console.error writes may
still be buffered in the WritableWorkerStdio back-pressure queue and
never transmitted to the parent process.
Fix by draining stderr (via an empty write with callback) before
calling process.exit(), ensuring all buffered error messages are
flushed through the MessageChannel to the parent's process.stderr
before the worker thread exits.
Co-Authored-By:
Claude <noreply@anthropic.com>
Showing
Please
register
or
sign in
to comment