Fix #576 Set correct filename option for UglifyJS.parse when parsing fromString

This commit is contained in:
Manuel Bouza 2014-11-05 07:56:28 +01:00
parent f36a1eaa8b
commit e39b3ad46c

View File

@ -78,7 +78,7 @@ exports.minify = function(files, options) {
: fs.readFileSync(file, "utf8"); : fs.readFileSync(file, "utf8");
sourcesContent[file] = code; sourcesContent[file] = code;
toplevel = UglifyJS.parse(code, { toplevel = UglifyJS.parse(code, {
filename: options.fromString ? "?" : file, filename: options.fromString ? options.outSourceMap : file,
toplevel: toplevel toplevel: toplevel
}); });
}); });