@@ -7301,6 +7301,13 @@ Compressor.prototype.compress = function(node) {
|
|||||||
}
|
}
|
||||||
}, function(node, in_list) {
|
}, function(node, in_list) {
|
||||||
if (node instanceof AST_BlockStatement) return trim_block(node, tt.parent(), in_list);
|
if (node instanceof AST_BlockStatement) return trim_block(node, tt.parent(), in_list);
|
||||||
|
if (node instanceof AST_ExportDeclaration) {
|
||||||
|
var block = node.body;
|
||||||
|
if (!(block instanceof AST_BlockStatement)) return;
|
||||||
|
node.body = block.body.pop();
|
||||||
|
block.body.push(node);
|
||||||
|
return in_list ? List.splice(block.body) : block;
|
||||||
|
}
|
||||||
if (node instanceof AST_For) return patch_for_init(node, in_list);
|
if (node instanceof AST_For) return patch_for_init(node, in_list);
|
||||||
if (node instanceof AST_ForIn) {
|
if (node instanceof AST_ForIn) {
|
||||||
if (!drop_vars || !compressor.option("loops")) return;
|
if (!drop_vars || !compressor.option("loops")) return;
|
||||||
|
|||||||
@@ -496,3 +496,16 @@ issue_4766: {
|
|||||||
export var a = "bar";
|
export var a = "bar";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
issue_5444: {
|
||||||
|
options = {
|
||||||
|
unused: true,
|
||||||
|
}
|
||||||
|
input: {
|
||||||
|
export var a = (console, console);
|
||||||
|
}
|
||||||
|
expect: {
|
||||||
|
console;
|
||||||
|
export var a = console;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user