diff --git a/lib/sourcemap.js b/lib/sourcemap.js index 663ef12e..403b4f4d 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -58,6 +58,15 @@ function SourceMap(options) { sourceRoot : options.root }); var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); + + // Copy across inline sourcesContent, if any + if (options.orig.sourcesContent) { + var len = options.orig.sourcesContent.length; + for (var i = 0; i < len; i++) { + generator.setSourceContent(options.orig.sources[i], options.orig.sourcesContent[i]); + } + } + function add(source, gen_line, gen_col, orig_line, orig_col, name) { if (orig_map) { var info = orig_map.originalPositionFor({