carrot / gulp-accord

Simple unified interface for compiling js languages with gulp
Other
24 stars 7 forks source link

SourceMaps: sourcesContent is null #2

Closed cspeer closed 8 years ago

cspeer commented 8 years ago

Hi there,

when I try to create sourcemaps for javascript files as described in the ReadMe, the sourcesContent attribute in the generated source map is just [null]:

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

gulp.task('default', function(){
  gulp.src('./test.styl')
  .pipe(sourcemaps.init())
  .pipe(accord('minify-js'))
  .pipe(sourcemaps.write('.'))
  .pipe(gulp.dest('./out'))
});

Everything works perfect if I skip the minifying part.

Any ideas?

Thanks, Chris

cspeer commented 8 years ago

I just stumbled upon the fact, that if i set:

.pipe(sourcemaps.init({ loadMaps: true }))

everything is fine. Not sure why.

cspeer commented 8 years ago

Ok, I'm sorry. The problem is https://github.com/Josiah/gulp-cachebust Please just disregard everything I said before. It's been a long day... But using cachebuster, even before sourcemaps.init() results in sourcesContent being [null]

jescalan commented 8 years ago

💖 glad it was worked out!