Avoid adding source map url twice
This commit is contained in:
parent
683aa31747
commit
eda3a19b38
|
|
@ -134,12 +134,14 @@ exports.minify = function(files, options) {
|
||||||
var stream = UglifyJS.OutputStream(output);
|
var stream = UglifyJS.OutputStream(output);
|
||||||
toplevel.print(stream);
|
toplevel.print(stream);
|
||||||
|
|
||||||
if(options.outSourceMap){
|
if(options.sourceMapURL){
|
||||||
|
stream += "\n//# sourceMappingURL=" + options.sourceMapURL;
|
||||||
|
} else if(options.outSourceMap){
|
||||||
stream += "\n//# sourceMappingURL=" + options.outSourceMap;
|
stream += "\n//# sourceMappingURL=" + options.outSourceMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
code : stream + (output.source_map ? "\n//@ sourceMappingURL=" + (options.sourceMapURL || options.outSourceMap) : ""),
|
code : stream + "",
|
||||||
map : output.source_map + ""
|
map : output.source_map + ""
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user