How to configure Gulp to build and compile Less files?

There is the main file which contains imports of other less files.
The problem with that would be if you change the data in imported files - collected and compiled the main css file.

Now everything happens in a strange way when you start Gulpа 1 time all is going as it should, the next time you save the imported files retain their original appearance and the changes in them do not affect the Assembly of the main css file. Whether they somehow were zacchiroli and don't pay attention to the changes. To check and remove the final css file, modify the values in the imported less files, keep. Looking forward to going css file with the new values, but in fact imported files in final Assembly have original appearance.

What's the problem?

gulp.task('less', function () {
 return gulp.src('resources/less/_imports.less')
.pipe(plumber({
 errorHandler: notify.onError(
 "ERROR:: <%= error.message %>")
}))
.pipe(less({
 paths: [ path.join(__dirname, 'less', 'includes')]
}))
.pipe(rename('style.css'))
.pipe(gulp.dest('resources/css/'))
.pipe(connect.reload());
});

gulp.task('watch', function(){
 gulp.watch('resources/less/**/*.less', ['less']);
})

gulp.task('default', ['connect', 'watch']);


There is an option to compile each less file separately and then glue already css part (gulp-contact) but lost the sequence. Anyway should and so to work.
June 7th 19 at 14:44
1 answer
June 7th 19 at 14:46
Solution
Read that they really are cached, but now it is not clear how to turn this off.

The solution is to compile each file separately + concatenation. + setting order strict Assembly sequence
global variables are imported into every file which uses
- no need to file with the imports of the remaining parts(blocks)

Find more questions by tags LessHTMLCSSGulp.js