question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SASS files don't get mapped

See original GitHub issue

Since i have to process SASS files to CSS for my Angular2 app, i created the following task:

gulp.task('create:styles', function(cb) {
    return gulp.src('src/app/**/*.scss')
                 .pipe(sourcemap.init())
                 .pipe(sass().on('error', sass.logError))
                 .pipe(sourcemap.write())
                 .pipe(gulp.dest(paths.dist + '/app/'));
    });

As you can see i’m using sourcemaps plugin to map source files of styles.

Do you know why i can’t see the source files (.scss) in the inspection tools of browsers? What’s wrong with sourcemaps plugin?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
gfdesigncommented, Sep 9, 2016

Hi again. I think I’ve found my problem. First, my gulpfile.js was wrong. This is the corrected version:

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

gulp.task('default', function() {
  gulp.src('src/**/*.scss')
  .pipe(sourcemaps.init('.'))
  .pipe(sass())
  .pipe(sourcemaps.write('.'))
  .pipe(gulp.dest('.'));
});

Second, I had to active in my Firefox browser in developer options this one: capture

I was dealing with this issue for days. I hope it helps someone else. Best regards

0reactions
smartm0usecommented, Sep 13, 2016

Here, on Chromium 52.0.2743.116 still not work:

dd

I have no .scss file in the source folder…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why won't the Sass property map-get work? - Stack Overflow
I have a map of font weights. I then try to access one of the keys using map-get() however when I save my...
Read more >
Dart Sass Command-Line Interface
Sass watches only the directories that you pass as-is on the command line, parent directories of filenames you pass on the command line,...
Read more >
How to Use Sass with CSS - freeCodeCamp
Sass is a CSS preprocessor that helps you manage tasks in large projects where the style sheets get larger, you have a number...
Read more >
SASS compiler generated .css.map files don't work in Chrome ...
I have a very similar problem with .css.map files generated by the LESS compiler. They do not work in Chrome unless I remove...
Read more >
Sass, SCSS, and Less | WebStorm Documentation - JetBrains
css.map files in a separate folder. Let's start with a simple case. Suppose you have a custom_output.scss file in the project root ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found