W 10 năm trước cách đây
mục cha
commit
377a5189df
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 6 4
      gulpfile.babel.js

+ 6 - 4
gulpfile.babel.js

@@ -74,13 +74,15 @@ gulp.task('dev-server', function() {
     contentBase: path.join(__dirname, 'build'),
     hot: true,
     filename: 'app.js',
-    watchOptions: {
-      aggregateTimeout: 300,
-      poll: 400
-    },
     stats: { colors: true },
     historyApiFallback: true
   });
+  bundler.watch({
+    aggregateTimeout: 300,
+    poll: 400
+  }, function(err, stats) {
+    // actions
+  });
   server.listen(3000, 'localhost', function (err) {
     if (err) { console.log(err); }
     console.log('Listening at localhost:3000');