-1

I'm trying to auto-refresh my page when I make changes with broswer-sync and gulp.

So far I have it working with my html but I can't seem to figure it out with my css code too.

I have this line of code in my gulpfile.js that works quite well with ONLY html.

gulp.watch("*.html").on("change", reload);

Any help? Thanks! I've also tried putting *.css into the .watch() function and had no luck. I also have a folder with my css in it named "css".

1 Answer 1

-1

Found the solution!

You cannot see changes with javascript nor CSS. If you want that you'll need to do a live server following https://www.npmjs.com/package/gulp-live-server

EDIT

Go download live server in VSCode, you're welcome...

1
  • You don't need that package to use browsersync and gulp to live update changes to javascript and CSS
    – Sean
    Sep 9, 2021 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.