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

Commit

Permalink
Merge pull request #182 from sveltejs/gh-177
Browse files Browse the repository at this point in the history
kill child process if webpack crashes
  • Loading branch information
Rich-Harris authored Mar 10, 2018
2 parents b106710 + 504654b commit c1a2d93
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 c1a2d93

Please sign in to comment.