gulp-sass: IncludePaths not working
I can’t get includePaths
working on version 2.3.2
of gulp-sass
and 4.4.2
of node.
Here’s my gulpfile contents:
const SASS_FILES = ['./code/styles/main.scss'];
const SASS_INCLUDE_PATHS = [
path.join(__dirname, '/node_modules/normalize-scss/sass/'),
path.join(__dirname, '/node_modules/bourbon/app/assets/stylesheets/'),
path.join(__dirname, '/node_modules/bourbon-neat/app/assets/stylesheets/'),
path.join(__dirname, '/node_modules/susy/sass/')
];
gulp.task('styles', function() {
return gulp.src(SASS_FILES)
.pipe(sass({ includePaths: SASS_INCLUDE_PATHS }))
.pipe(gulp.dest(BUILD_DEST));
});
The task runs without error, and scss
files I have within ./code/styles/
are pulled in just fine, but it seems the includePaths
imports are completely ignored. If I strip my main.scss
back to the following, for example:
@import 'normalize';
// @import 'bourbon';
// @import 'neat';
// @import 'susy';
My output is a completely blank file.
Interestingly, if I import bourbon
and neat
I do get something in my output, just not what I’d expect:
html {
box-sizing: border-box; }
*, *::after, *::before {
box-sizing: inherit; }
Importing susy
, again, yeilds no extra css added to the output.
Any advice anyone could offer would be much appreciated.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 26
nevermind, I fixed it. It is because normalize scss needs
@include normalize();
I also have an issue using includePaths. I’m using bower dependencies.
includePaths: ['bower_components/normalize-scss/sass']
Any ideas ?
@xzyfer Doing what you suggested there I get no error output, and I have the same issue on
2.3.1
I’m afraid.