Answer the question
In order to leave comments, you need to log in
Gulp periodically "stumbles", how to cure?
I collect styles using Gulp, SASS is used.
The project is large, so I divided the styles into modules and import them into a common file.
When saving a file, Gulp periodically "stumbles" on compiling SASS, giving the following import error:
file to import not found or unreadable: ../utils/util
gulp.task('style', function () {
gulp.src(path.src.style)
.pipe(plumber())
.pipe(sass())
.pipe(prefixer({browsers: ['last 2 versions', 'ie 8']}))
.pipe(minifyCSS())
.pipe(gulp.dest(path.build.css))
.pipe(reload({stream:true}));
});
Answer the question
In order to leave comments, you need to log in
Well, judging by your comment, the problem is in the path.src.style variable. It refers to all scss files, and you should have one main file (entry point). And in it you have to import other files.
For example, there is such a structure:
_content.scss
_article.scss
main.scss
Main.scss should contain the following code
import "content";
import "article";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question