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

Commit c1a2d93

Browse files
authored
Merge pull request #182 from sveltejs/gh-177
kill child process if webpack crashes
2 parents b106710 + 504654b commit c1a2d93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cli/dev.ts

+5
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ export default async function dev(port: number) {
9797

9898
let proc: child_process.ChildProcess;
9999

100+
process.on('exit', () => {
101+
// sometimes webpack crashes, so we need to kill our children
102+
if (proc) proc.kill();
103+
});
104+
100105
const deferreds = {
101106
server: deferred(),
102107
client: deferred()

0 commit comments

Comments
 (0)