I have the following gulp task:
var gulp = require('gulp'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'); gulp.src('html/css/sass/*.scss') .pipe(sass({ style: 'compressed', loadPath: 'plugin/css/sass', sourcemap: true, sourcemapPath: '/css/sass', container : 'local_sass' })) .pipe(autoprefixer()) .pipe(gulp.dest('html/css'));
The problem I ran into is that the SASS compiler correctly generates the source maps and adds the sourcemap comment, but then autoprefixer removes the comment (and I don't think it also updates the source maps).
I tried to remove autoprefixer and it works fine, but when I get it back they will comment on it. I also tried adding { map: true } , but then each sourcemap just has the name to.css.map . I also tried adding from and to , but I donβt know how to do this to indicate the current file name, so that it is always written to the same file name.
How can I get autoprefixer to collaborate and update the source files ? Is there any other plugin I need to use?
Packages:
"gulp": "~3.8.6", "gulp-autoprefixer": "~0.0.8", "gulp-ruby-sass": "~0.7.0",
source share