Answer the question
In order to leave comments, you need to log in
How to configure browser-sync to work with js files?
I want to set up a browsersunk to automatically refresh the page after a change in js files, but the default settings do not provide it for a watcher for js files, as soon as I did not try to change the task (gulp.watch("*.oy").on("change", reload) ;), nothing works, maybe someone has an example of use?
Answer the question
In order to leave comments, you need to log in
Here:
gulp.task('browser-sync', function() {
browserSync({
server: {
baseDir: 'dev/client'
},
notify: false
});
});
gulp.task('watch', ['browser-sync',], function() {
gulp.watch('ваш_путь/**/*.js', browserSync.reload);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question