Apart from enabling source maps
in Chrome, in my gulpfile.js I use errLogToConsole: true, sourceComments: 'map', sourceMap: 'sass'
as arguments when calling sass
based on this answer:
gulp.task('sass', function() {
return gulp.src('../assets/styles/**/*.scss')
.pipe(plumber({ errorHandler: onError }))
.pipe(sass({errLogToConsole: true, sourceComments: 'map', sourceMap: 'sass'}))
.pipe(autoprefixer())
.pipe(gulp.dest('../dist/styles'))
.pipe(browserSync.reload({
stream: true
}))
});
Yet SCSS
content still doesn't show up in DevTools. Why?
Note: source map comments do show up in compiled CSS as shown in screenshot below
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…