Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Patric Karl
Patric Karl
11,796 Points

Sourcemaps with clean-css in gulp

Hey there, i am trying to include a few steps in my gulpfile.js. It works so far but if i inspect the ".main-heading" it shows the "_mixins.scss" instead of "_typographie.scss " in the sourcemap. (I am refering to the gulpfile-course with the "Lake Tahoe" Website). Other properties, like the footer for example, are mapped correctly.

Maybe some of you can help me out. Thanks a lot.

Her is my code:

gulp.task("compileSass", function () {
  return gulp.src("scss/application.scss")
  //Define the source map plugin
    .pipe(sourcemaps.init())
      .pipe(sass())
      .pipe(autoprefixer({
          browsers: ['last 99 versions'],
          cascade: false
      }))

    .pipe(cleanCSS({compatibility: 'ie8'}))
    .pipe(rename("application.min.css"))
    .pipe(sourcemaps.write("./"))
    .pipe(gulp.dest("css"))
});