From 4d37f397fdfc2031832680a1d49949c5ac7355b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Santos?= Date: Thu, 1 Dec 2022 20:45:32 +0000 Subject: [PATCH] traverse exported code while hoisting object properties. Closes #1307 --- lib/compress/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/compress/index.js b/lib/compress/index.js index 4068f983e..5900bd674 100644 --- a/lib/compress/index.js +++ b/lib/compress/index.js @@ -1176,8 +1176,6 @@ AST_Scope.DEFMETHOD("hoist_properties", function(compressor) { var top_retain = self instanceof AST_Toplevel && compressor.top_retain || return_false; var defs_by_id = new Map(); var hoister = new TreeTransformer(function(node, descend) { - if (node instanceof AST_Definitions - && hoister.parent() instanceof AST_Export) return node; if (node instanceof AST_VarDef) { const sym = node.name; let def;