From 997d09bb33f95cf414235b8fc3d3b0539d33d2a2 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 17 Mar 2021 01:28:27 +0000 Subject: extend `keep_fnames` to classes (#4793) --- test/compress/classes.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/compress/classes.js') diff --git a/test/compress/classes.js b/test/compress/classes.js index cebccf95..46749a27 100644 --- a/test/compress/classes.js +++ b/test/compress/classes.js @@ -779,6 +779,27 @@ computed_key_generator: { node_version: ">=4" } +keep_fnames: { + options = { + keep_fnames: true, + toplevel: true, + } + mangle = { + keep_fnames: true, + toplevel: true, + } + input: { + "use strict"; + class Foo {} + console.log(Foo.name, class Bar {}.name); + } + expect: { + "use strict"; + class Foo {} + console.log(Foo.name, class Bar {}.name); + } +} + issue_805_1: { options = { inline: true, -- cgit v1.2.3