D
D
Dmitry2016-08-17 20:28:20
Sass
Dmitry, 2016-08-17 20:28:20

Why does watch crash when importing scss?

gulp.task('sass', function(){
  return gulp.src('app/scss/main.scss')
    .pipe(sass())
    .pipe(autoprefixer())
    .pipe(gulp.dest('app/css'))
    .pipe(browserSync.reload({stream: true}))
});


gulp.task('browser-sync', function(){
  browserSync({
    server: {
      baseDir : 'app'
    },
    notify: false
  })
});

gulp.task('watch', ['browser-sync', 'sass'], function(){
        gulp.watch('app/scss/**/*.scss', ['sass']);
        gulp.watch('app/jade/**/*.jade', ['jadeh']);
        gulp.watch('app/*.html', browserSync.reload);
        gulp.watch('app/*.сss', browserSync.reload);
        gulp.watch('app/js/**/*.js', browserSync.reload);
});

Actually, I have it main.scssimported variable.scssthrough @import 'variable.scss';and everything works fine.
But as soon as I watchchange and save with -e variable.scss, my task breaks with such an error 03c03cfe9471461a8a7ac9a2e67cf68c.png
. Why does this actually happen? Am I importing the file incorrectly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question