File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,10 @@ class Server {
447
447
const compilerWatchOptions = compilerOptions . watchOptions || { } ;
448
448
449
449
const getDefaultWatchOptions = ( watchOptions = { } ) => {
450
+ watchOptions = {
451
+ ...compilerWatchOptions ,
452
+ ...watchOptions ,
453
+ } ;
450
454
// duplicate the same massaging of options that watchpack performs
451
455
// https://github.com/webpack/watchpack/blob/master/lib/DirectoryWatcher.js#L49
452
456
// this isn't an elegant solution, but we'll improve it in the future
@@ -464,24 +468,23 @@ class Server {
464
468
: // eslint-disable-next-line no-undefined
465
469
undefined ;
466
470
471
+ if ( watchOptions . poll ) {
472
+ delete watchOptions . poll ;
473
+ }
474
+
467
475
const finalWatchOptions = {
468
476
ignoreInitial : true ,
469
477
persistent : true ,
470
478
followSymlinks : false ,
471
479
atomic : false ,
472
480
alwaysStat : true ,
473
481
ignorePermissionErrors : true ,
474
- ...compilerWatchOptions ,
475
482
...watchOptions ,
476
483
ignored : watchOptions . ignored ,
477
484
usePolling,
478
485
interval,
479
486
} ;
480
487
481
- if ( finalWatchOptions . poll ) {
482
- delete finalWatchOptions . poll ;
483
- }
484
-
485
488
return finalWatchOptions ;
486
489
} ;
487
490
You can’t perform that action at this time.
0 commit comments