Skip to content

Commit

Permalink
fix(@ngtools/webpack): use process.once instead of process.on
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva committed Oct 18, 2017
1 parent 77a6cc8 commit c410ba9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/@ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ export class AngularCompilerPlugin implements Tapable {
? './type_checker_bootstrap.js'
: './type_checker.js';


let hasMemoryFlag = false;
const memoryFlagRegex = /--max-old-space-size/;
const debugArgRegex = /--inspect(?:-brk|-port)?|--debug(?:-brk|-port)/;
Expand Down Expand Up @@ -490,9 +489,9 @@ export class AngularCompilerPlugin implements Tapable {
treeKill(this._typeCheckerProcess.pid, 'SIGTERM');
process.exit();
};
process.on('exit', killTypeCheckerProcess);
process.on('SIGINT', killTypeCheckerProcess);
process.on('uncaughtException', killTypeCheckerProcess);
process.once('exit', killTypeCheckerProcess);
process.once('SIGINT', killTypeCheckerProcess);
process.once('uncaughtException', killTypeCheckerProcess);
}

private _updateForkedTypeChecker(changedTsFiles: string[]) {
Expand Down

0 comments on commit c410ba9

Please sign in to comment.