Sass sourcemap chrome dev tools


#1

Is there a way I can use sass sourcemaps with ‘ionic serve’, I am using chrome dev tools?

Cheers,
Martin


#2

Try putting the ‘scss’ folder within the ‘www’ and reconfigure gulp tasks like this:

var sourcemaps = require('gulp-sourcemaps');  

gulp.task('sass', function(done) {
    gulp.src('./www/scss/ionic.app.scss')
        .pipe(sourcemaps.init())
        .pipe(sass({
             errLogToConsole: true
         }))
        .pipe(sourcemaps.write())
       .pipe(gulp.dest('./www/css/'))
       .pipe(minifyCss({
            keepSpecialComments: 0
        }))
        .pipe(rename({ extname: '.min.css' }))
        .pipe(gulp.dest('./www/css/'))
        .on('end', done);
 });