diff --git a/tools/node.js b/tools/node.js index 7bba3231..29d5632d 100644 --- a/tools/node.js +++ b/tools/node.js @@ -73,13 +73,13 @@ exports.minify = function(files, options) { } else { if (typeof files == "string") files = [ files ]; - files.forEach(function(file){ + files.forEach(function(file, i){ var code = options.fromString ? file : fs.readFileSync(file, "utf8"); sourcesContent[file] = code; toplevel = UglifyJS.parse(code, { - filename: options.fromString ? "?" : file, + filename: options.fromString ? i : file, toplevel: toplevel }); });