webpack-cli
webpack-cli copied to clipboard
fix: close compiler on SIGINT
What kind of change does this PR introduce? fix
Did you add tests for your changes? No If relevant, did you update the documentation? No Summary
Fix #2918
Does this PR introduce a breaking change? None
Other information No
Codecov Report
Merging #2919 (52d9a0c) into master (06cd267) will decrease coverage by
0.12%
. The diff coverage is88.88%
.
@@ Coverage Diff @@
## master #2919 +/- ##
==========================================
- Coverage 95.13% 95.00% -0.13%
==========================================
Files 31 31
Lines 1684 1701 +17
Branches 481 484 +3
==========================================
+ Hits 1602 1616 +14
- Misses 82 85 +3
Impacted Files | Coverage Δ | |
---|---|---|
packages/webpack-cli/lib/webpack-cli.js | 96.34% <77.77%> (-0.18%) |
:arrow_down: |
packages/serve/src/index.ts | 84.52% <94.44%> (+0.24%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 06cd267...52d9a0c. Read the comment docs.
I will add tests
@snitin315 We need improve logic here: we need allow to graceful close and allow immutability disable, my idea - when developer run CTRL + C
we try to close()
, if CTRL + C
pressed again we close immediately, also we need handle const signals = ["SIGINT", "SIGTERM"];
signals, for serve
we need disable setupExitSignals
and move this logic here https://github.com/webpack/webpack-dev-server/blob/master/lib/Server.js#L1088 (in future major release we will remove this option, because it is wrong place for this, developer should handle closing manually)
Makes sense, I will update it in near future.
@snitin315 hello, let's finish, just copy logic from dev server
@alexander-akait sure 👍🏻