From 566dbd29c3011cd0b131fb2c21c56d932b157090 Mon Sep 17 00:00:00 2001 From: Jake Hasler Date: Wed, 8 Nov 2017 15:59:41 -0700 Subject: [PATCH] Exiting on stdin exit --- packages/react-scripts/scripts/start.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/react-scripts/scripts/start.js b/packages/react-scripts/scripts/start.js index 8df052d3bbb..c115adcb4eb 100644 --- a/packages/react-scripts/scripts/start.js +++ b/packages/react-scripts/scripts/start.js @@ -91,6 +91,12 @@ choosePort(HOST, DEFAULT_PORT) process.exit(); }); }); + + process.stdin.on('end', function() { + devServer.close(); + process.exit(); + }); + process.stdin.resume(); }) .catch(err => { if (err && err.message) {