diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-21 02:00:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 10:00:34 +0800 |
commit | bfe3a8b5161457062224959bbb9938c106503f97 (patch) | |
tree | e8d190a5e06daba29ee5c398d7e5861974b165ee /test/compress | |
parent | ae09773ba017ce65b261d15ed3098ae40c3b2a1b (diff) | |
download | tracifyjs-bfe3a8b5161457062224959bbb9938c106503f97.tar.gz tracifyjs-bfe3a8b5161457062224959bbb9938c106503f97.zip |
fix corner case with `import` (#4672)
Diffstat (limited to 'test/compress')
-rw-r--r-- | test/compress/imports.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/compress/imports.js b/test/compress/imports.js index 03ebf997..f8313b06 100644 --- a/test/compress/imports.js +++ b/test/compress/imports.js @@ -128,3 +128,19 @@ rename_mangle: { import * as r from "moz"; } } + +keep_ref: { + options = { + reduce_vars: true, + toplevel: true, + unused: true, + } + input: { + import foo from "bar"; + foo(); + } + expect: { + import foo from "bar"; + foo(); + } +} |