From b943c0d43899fda8ba170da97e661c66d42a5439 Mon Sep 17 00:00:00 2001 From: kzc Date: Tue, 21 Feb 2017 00:30:11 -0500 Subject: [PATCH] have `#__PURE__` hint only work when compress `side_effects` option enabled --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index e9591590..7f3574de 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1288,7 +1288,7 @@ merge(Compressor.prototype, { } def(AST_Call, function(compressor){ - if (has_pure_annotation(this)) { + if (compressor.option("side_effects") && has_pure_annotation(this)) { compressor.warn("Dropping __PURE__ call [{file}:{line},{col}]", this.start); return false; }