Skip to content

Commit

Permalink
Closes webpack dev server and exits process on "end" stdin (#7203)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
  • Loading branch information
Kelsey Leftwich and ianschmitz committed Feb 19, 2020
1 parent af926d5 commit 7e6d6cd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/react-scripts/scripts/start.js
Expand Up @@ -164,6 +164,15 @@ checkBrowsers(paths.appPath, isInteractive)
process.exit();
});
});

if (isInteractive || process.env.CI !== 'true') {
// Gracefully exit when stdin ends
process.stdin.on('end', function() {
devServer.close();
process.exit();
});
process.stdin.resume();
}
})
.catch(err => {
if (err && err.message) {
Expand Down

0 comments on commit 7e6d6cd

Please sign in to comment.