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