Skip to content

Commit 3580ff1

Browse files
committed
fix: clear kill process for wepback when exit on itself - build
1 parent 1adce66 commit 3580ff1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/services/webpack/webpack-compiler-service.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
7171
}
7272
});
7373

74-
childProcess.on("close", (arg: any) => {
74+
childProcess.on("close", async (arg: any) => {
7575
const exitCode = typeof arg === "number" ? arg : arg && arg.code;
7676
if (exitCode === 0) {
7777
resolve(childProcess);
@@ -80,6 +80,8 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
8080
error.code = exitCode;
8181
reject(error);
8282
}
83+
84+
await this.$cleanupService.removeKillProcess(childProcess.pid.toString());
8385
});
8486
});
8587
}
@@ -92,7 +94,7 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
9294
}
9395

9496
const childProcess = await this.startWebpackProcess(platformData, projectData, prepareData);
95-
childProcess.on("close", (arg: any) => {
97+
childProcess.on("close", async (arg: any) => {
9698
const exitCode = typeof arg === "number" ? arg : arg && arg.code;
9799
if (exitCode === 0) {
98100
resolve();
@@ -101,6 +103,8 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
101103
error.code = exitCode;
102104
reject(error);
103105
}
106+
107+
await this.$cleanupService.removeKillProcess(childProcess.pid.toString());
104108
});
105109
});
106110
}

0 commit comments

Comments
 (0)