@@ -69,6 +69,7 @@ function Compressor(options, false_by_default) {
|
||||
if_return : !false_by_default,
|
||||
inline : !false_by_default,
|
||||
join_vars : !false_by_default,
|
||||
keep_classnames: false,
|
||||
keep_fargs : true,
|
||||
keep_fnames : false,
|
||||
keep_infinity : false,
|
||||
@@ -2610,8 +2611,9 @@ merge(Compressor.prototype, {
|
||||
// pass 3: we should drop declarations not in_use
|
||||
var tt = new TreeTransformer(
|
||||
function before(node, descend, in_list) {
|
||||
if (!compressor.option("keep_fnames")
|
||||
&& node.name && (node instanceof AST_Function || node instanceof AST_ClassExpression)) {
|
||||
if (node.name
|
||||
&& (!compressor.option("keep_classnames") && node instanceof AST_ClassExpression
|
||||
|| !compressor.option("keep_fnames") && node instanceof AST_Function)) {
|
||||
var def = node.name.definition();
|
||||
// any declarations with same name will overshadow
|
||||
// name of this anonymous function and can therefore
|
||||
|
||||
Reference in New Issue
Block a user