Skip to content

Commit 925fa03

Browse files
clydinvikerman
authored andcommitted
refactor(@ngtools/webpack): remove unneeded tree-kill dependency
1 parent 0b7716e commit 925fa03

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"@angular-devkit/core": "0.0.0",
2525
"enhanced-resolve": "4.1.1",
2626
"rxjs": "6.5.3",
27-
"tree-kill": "1.2.1",
2827
"webpack-sources": "1.4.3"
2928
},
3029
"peerDependencies": {

src/angular_compiler_plugin.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ import {
8383
} from './webpack';
8484
import { WebpackInputHost } from './webpack-input-host';
8585

86-
const treeKill = require('tree-kill');
87-
8886
export class AngularCompilerPlugin {
8987
private _options: AngularCompilerPluginOptions;
9088

@@ -570,8 +568,10 @@ export class AngularCompilerPlugin {
570568
}
571569

572570
private _killForkedTypeChecker() {
573-
if (this._typeCheckerProcess && this._typeCheckerProcess.pid) {
574-
treeKill(this._typeCheckerProcess.pid, 'SIGTERM');
571+
if (this._typeCheckerProcess && !this._typeCheckerProcess.killed) {
572+
try {
573+
this._typeCheckerProcess.kill();
574+
} catch {}
575575
this._typeCheckerProcess = null;
576576
}
577577
}

0 commit comments

Comments
 (0)