gulp-sass: Invalid sourcemaps on v3.0.0
Hey just a heads up, when I tried upgrading to 3.0.0 I was getting source map errors when trying to load the sourcemaps again downstream.
Example:
return gulp.src([
rootDir + '/styles/sass/*.scss'
])
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write('./'))
.pipe(gulpif(minifyMe, cssMin()))
.pipe(gulp.dest(sassifiedDir));
Then trying to call sourcemaps.init({loadMaps: true}) elsewhere throws:
Error: Invalid mapping: {"generated":{"line":8370,"column":7},"source":"app/vendors/bower_components/robo-ui/dist/sass/mixins/_clearfix.scss","original":{"line":3,"column":-38},"name":null}
I downgraded to 2.3.2 and it works now, but wanted to let you know.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 18
- Comments: 28
Commits related to this issue
- Reverting Gulp Sass back to 2.3.2 Currently v3+ has issues with LibSass. See https://github.com/dlmanning/gulp-sass/issues/577 — committed to frontalspy/sage-foundation by frontalspy 7 years ago
There’s already a patch https://github.com/sass/libsass/pull/2540 and should be part of the next libsass release.
Looks like it fixed in v3.2.0
@entr it looks like it’s been merged into libsass master, so should this now be resolved in gulp-sass? Because I’m still experiencing problems with 3.1.0.
The upstream (libsass) related issue’s conversation has been blocked… has anyone found a fix yet?
Same here. In my case the row that causes the error is an
&:before
rule inside a mixin.Same here. Confirmed with and without compression.