Skip to content

Commit b07c385

Browse files
AndaristForsakenHarmony
authored andcommitted
Preserve #__PURE__ annotations (#347)
1 parent d59f4ae commit b07c385

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,9 @@ function createConfig(options, entry, format, writeMeta) {
594594
options.compress !== false && [
595595
terser({
596596
sourcemap: true,
597-
output: { comments: false },
597+
output: {
598+
comments: (node, comment) => /[@#]__PURE__/.test(comment.value),
599+
},
598600
compress: Object.assign(
599601
{
600602
keep_infinity: true,

0 commit comments

Comments
 (0)