Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
kill child process if webpack crashes - fixes #177
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Mar 10, 2018
1 parent b106710 commit 504654b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ export default async function dev(port: number) {

let proc: child_process.ChildProcess;

process.on('exit', () => {
// sometimes webpack crashes, so we need to kill our children
if (proc) proc.kill();
});

const deferreds = {
server: deferred(),
client: deferred()
Expand Down

0 comments on commit 504654b

Please sign in to comment.