-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes bug where dev server doesnt close after webpack compile error #167
Conversation
Can you ELI5? |
So if someone started up dev and received a Webpack compile error they would see an error message. This prompts some users to ^C in their terminal to stop the dev process and make their changes. But this did not kill the underlying process so when restarting the dev server there was a port in use error (more details in @tizmagik comment in #51) What I've done here is created a way to capture that ^C when the user wants to exit and I shut down the process which cleanly exits the running servers. Does that make sense? |
@@ -18,6 +18,11 @@ const { buildPath, serverSrcPath } = require('../../utils/paths')(); | |||
module.exports = (config) => { | |||
logger.start('Starting development build...'); | |||
|
|||
// Kill the server on exit. | |||
process.on('SIGINT', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be
process.on('SIGINT', process.exit);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* master: fixes bug where dev server doesnt close after webpack compile error (#167)
Fixes #51
The dev server wasn't closing when exiting dev after a Webpack compile error. Now the server exits cleanly.