简体   繁体   中英

File to import not found or unreadable sass

I am using gulp to watch for sass from time to time its giving me an error for example " File to import not found or unreadable : 4-layout/header."

Here is my folder structure

在此处输入图片说明

here is how i import header for example inside the main.sass

@import '4-layout/header'

here is my gulp task

gulp.task('sass', function() {
    return gulp.src('source/sass/**/*.sass')
        .pipe(plumber())
        .pipe(sass({
            style: 'compressed'
        }))
        .pipe(autoprefixer())
        .pipe(minifycss())
        .pipe(rename({
            basename: 'main',
            suffix: '.min'
          }))

        .pipe(gulp.dest('build/assets/css'));
});

请尝试../4-layout/header修复问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM