fix: use process.exitCode instead of process.exit in compilerCallback · webpack/webpack-cli@ee001bd

Original file line numberDiff line numberDiff line change

@@ -314,7 +314,8 @@ For more information, see https://webpack.js.org/api/cli/.`);

314314

lastHash = null;

315315

console.error(err.stack || err);

316316

if (err.details) console.error(err.details);

317-

process.exit(1); // eslint-disable-line

317+

process.exitCode = 1;

318+

return;

318319

}

319320

if (outputOptions.json) {

320321

stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n");