Skip to content

Commit 880b473

Browse files
author
F1LT3R
committed
Graceful creat-react-app server process wind down.
1 parent 6fb31d7 commit 880b473

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/react-scripts/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@react-workspaces/react-scripts",
3-
"version": "3.0.0-alpha-04",
4-
"description": "Configuration and scripts for Create React App.",
3+
"version": "3.0.1-alpha-06",
4+
"description": "React + Yarn Workspaces Configuration and scripts for Create React App.",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/facebook/create-react-app.git",

packages/react-scripts/scripts/start.js

+9
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ checkBrowsers(paths.appPath, isInteractive)
152152
process.exit();
153153
});
154154
});
155+
156+
// We need this to close the WebPack Server
157+
// Thanks @1player! https://github.com/facebook/create-react-app/issues/1753#issuecomment-329972786
158+
process.stdin.on("end", function() {
159+
devServer.close();
160+
process.exit();
161+
});
162+
163+
process.stdin.resume();
155164
})
156165
.catch(err => {
157166
if (err && err.message) {

0 commit comments

Comments
 (0)