File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2484,18 +2484,22 @@ class WebpackCLI implements IWebpackCLI {
2484
2484
2485
2485
compiler = await this . createCompiler ( options as WebpackDevServerOptions , callback ) ;
2486
2486
2487
- if ( ! compiler ) {
2488
- return ;
2489
- }
2487
+ if ( ! compiler ) return ;
2490
2488
2491
2489
const isWatch = ( compiler : WebpackCompiler ) : boolean =>
2492
2490
Boolean (
2493
2491
this . isMultipleCompiler ( compiler )
2494
2492
? compiler . compilers . some ( ( compiler ) => compiler . options . watch )
2495
2493
: compiler . options . watch ,
2496
2494
) ;
2495
+ const isCacheEnabled = ( compiler : WebpackCompiler ) : boolean =>
2496
+ Boolean (
2497
+ this . isMultipleCompiler ( compiler )
2498
+ ? compiler . compilers . some ( ( compiler ) => compiler . options . cache )
2499
+ : compiler . options . cache ,
2500
+ ) ;
2497
2501
2498
- if ( isWatch ( compiler ) ) {
2502
+ if ( isWatch ( compiler ) || isCacheEnabled ( compiler ) ) {
2499
2503
let needForceShutdown = false ;
2500
2504
2501
2505
for ( const signal of EXIT_SIGNALS ) {
You can’t perform that action at this time.
0 commit comments