简体   繁体   English

找不到要导入的文件或无法读取的SASS

[英]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." 我不时使用gulp来监视sass,这给了我一个错误,例如“找不到要导入的文件或不可读的文件:4-layout / header”。

Here is my folder structure 这是我的文件夹结构

在此处输入图片说明

here is how i import header for example inside the main.sass 这是我例如在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修复问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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