Gulp-sass fails to compile scss file

南笙酒味 提交于 2019-12-03 02:23:43

Keep your imports as is, just pass the includePaths option in your gulp sass module as an argument:

gulp.src('./_/sass/style.scss')
        .pipe(sass({ includePaths : ['_/sass/'] }))
        .pipe(gulp.dest('./'));

...should do it for you.

As per https://github.com/dlmanning/gulp-sass/issues/1

For this you need to do start with same gulpfile.js folder

@import '_/sass/reset'

I think the Gulp reads the import and find the file from where gulpfile.js are located

If you use Sublime text with Windows, you should add rules in Sunlime config. Just add "atomic_save" : true in Preferences>Settings-User

https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes#partials-sporadically-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!