diff --git a/tools/node.js b/tools/node.js index 52405f3a..21a202fb 100644 --- a/tools/node.js +++ b/tools/node.js @@ -134,12 +134,14 @@ exports.minify = function(files, options) { var stream = UglifyJS.OutputStream(output); toplevel.print(stream); - if(options.outSourceMap){ + if(options.sourceMapURL){ + stream += "\n//# sourceMappingURL=" + options.sourceMapURL; + } else if(options.outSourceMap){ stream += "\n//# sourceMappingURL=" + options.outSourceMap; } return { - code : stream + (output.source_map ? "\n//@ sourceMappingURL=" + (options.sourceMapURL || options.outSourceMap) : ""), + code : stream + "", map : output.source_map + "" }; };