1

Here is the task:

dev.assets.sass = [
            'client/modules/*[!public]*/scss/*.scss'
        ];

gulp.task('sass', function () {
    gulp.src(dev.assets.sass)
        .pipe(sourcemaps.init())
        .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
        .pipe(concat('application.min.css'))
        .pipe(sourcemaps.write('./maps'))
        .pipe(gulp.dest('./client/build'));
});

The issue is that the source map looks like this:

{"version":3,"sources":["../../stdin"]....

which is not what I expected. I would like something similar to bootstrap, where, in the chrome developer a style is mapped back to its original less source. My sourcemaps are just mapping back to stdin which I assume is the result of the sass pipe. I think gulp-sourcemaps is only creating the map for the last operation...

pQuestions123
  • 4,471
  • 6
  • 28
  • 59

1 Answers1

2

You need to update gulp-sass to version 2.1.1. This was a bug in gulp-sass that was fixed with the latest release.

Source: https://github.com/dlmanning/gulp-sass/issues/394

Colin Marshall
  • 2,142
  • 2
  • 21
  • 31