From 8c8cd007fd12932b9188dfb8f4ba0ef2f1f4195a Mon Sep 17 00:00:00 2001 From: Ivan Demchuk Date: Sat, 13 Jun 2020 22:18:39 +0300 Subject: [PATCH] Fix gulp.watch --- gulp/gulpfile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulp/gulpfile.js b/gulp/gulpfile.js index 25f100ea..cf0077bd 100644 --- a/gulp/gulpfile.js +++ b/gulp/gulpfile.js @@ -189,12 +189,12 @@ function serve({ standalone }) { // Watch the build folder and reload when anything changed const extensions = ["html", "js", "png", "gif", "jpg", "svg", "mp3", "ico", "woff2", "json"]; - gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (e) { - return gulp.src(e.path).pipe(browserSync.reload({ stream: true })); + gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (path) { + return gulp.src(path).pipe(browserSync.reload({ stream: true })); }); - gulp.watch("../src/js/built-temp/*.json").on("change", function (e) { - return gulp.src(e.path).pipe(browserSync.reload({ stream: true })); + gulp.watch("../src/js/built-temp/*.json").on("change", function (path) { + return gulp.src(path).pipe(browserSync.reload({ stream: true })); }); // Start the webpack watching server (Will never return)