1

BrowserSync gulp plugin, Is not reloading the browser page while the view is on the index.html which means localhost:3000

gulp.task("browserSync", function () {
  browserSync.init({
    server: {
      baseDir: "./public"
    }
  });
});

gulp.task("liveReload", [
  "browserSync", "copy", "watch"
], function () {
  gulp.watch("src/**/*.html", browserSync.reload);
});

it's reloading only when the URL is pointing to other .html pages. like: localhost:3000/en/pricing.html

Project Structure:

src

index.html
/html
  pricing.html
  ...

Public

index.html
 /en
  pricing.html
  ...
 /ar
  pricing.html
  ...

What is my code issue?

Moussawi7
  • 12,359
  • 5
  • 37
  • 50
Khaled Ramadan
  • 161
  • 3
  • 13

0 Answers0