Browse Source

Revert "dev: fix gulp-watch cpu usage"

This reverts commit 261efce9375802baf93d7827a00d95f43174f72f.
Andelf 3 years ago
parent
commit
dbdb119438
1 changed files with 2 additions and 8 deletions
  1. 2 8
      gulpfile.js

+ 2 - 8
gulpfile.js

@@ -46,10 +46,7 @@ const common = {
   },
 
   keepSyncResourceFile () {
-    return gulp.watch(resourceFilePath, { 
-      ignoreInitial: true,
-      usePolling: false  // Don't know why but have to set explicitly, or high cpu usage
-     }, common.syncResourceFile)
+    return gulp.watch(resourceFilePath, { ignoreInitial: true }, common.syncResourceFile)
   },
 
   syncAllStatic () {
@@ -70,10 +67,7 @@ const common = {
     return gulp.watch([
       path.join(outputPath, 'js/**'),
       path.join(outputPath, 'css/**')
-    ], { 
-      ignoreInitial: true,
-      usePolling: false  // Don't know why but have to set explicitly, or high cpu usage
-    }, common.syncJS_CSSinRt)
+    ], { ignoreInitial: true }, common.syncJS_CSSinRt)
   }
 }