Answer the question
In order to leave comments, you need to log in
Why do all pug files compile when only one changes?
I collect pug files. Reloading pages with browsersync. But the page takes a long time to load because browsersync until all the pug files are collected. Although only one pug file has been changed.
gulp.task(function templates(cb) {
const data = require('./templates/data/data.json');
gulp.src('/pages/**/*.pug')
.pipe(plumber())
.pipe(pug({
locals: data
}).on('error', function(error) {
console.log(error);
}))
.pipe(gulp.dest('dist/'))
cb();
});
Answer the question
In order to leave comments, you need to log in
The answer here is what and how to optimize.
https://www.youtube.com/watch?v=jocvHauHcA4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question