0

Web page is updated when I change the file which is imported in main.less, but styles from imported less file don't change in completed main.min.css

--gulpfile.js--

gulp.task('browser-sync', function() {
browsersync({
    proxy: "nika.local",
    notify: false
})
});

gulp.task('styles', function() {
return gulp.src('app/less/**/*.less')
.pipe(less())
.pipe(rename({ suffix: '.min', prefix : '' }))
.pipe(autoprefixer(['last 15 versions']))
.pipe(gulp.dest('app/css'))
.pipe(browsersync.reload( {stream: true} ))
});

gulp.task('watch', ['styles', 'js', 'browser-sync'], function() {
gulp.watch('app/less/**/*.less', ['styles']);
});

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

--main.less--

//main.less
@import url("block/home-page.less");
bariod
  • 69
  • 2
  • 11
  • Aren't less imports just @import "block/home-page.less" [no url()] – Mark Apr 09 '18 at 14:06
  • See four or five last [`[gulp] [less]`](https://stackoverflow.com/questions/tagged/gulp+less) questions: https://stackoverflow.com/questions/49618710, https://stackoverflow.com/questions/49132742, https://stackoverflow.com/questions/49416905, https://stackoverflow.com/questions/49529313, https://stackoverflow.com/questions/49350880 etc. – seven-phases-max Apr 09 '18 at 15:13

0 Answers0