Skip to content

Commit 30f0bc7

Browse files
committed
test(javascript): record oxc renaming a private name a direct eval reads
The oxc case keeping #used for eval('this.#used') is now 3 bytes bigger than oxc's output, which renames #used to #e and leaves the string as it was, so its eval throws a SyntaxError. It is listed with the outputs oxc gets wrong.
1 parent 93db16a commit 30f0bc7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎test/helpers/oxcSmaller.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,10 @@ const OXC_SMALLER_BY_REASON = [
20272027
[
20282028
"oxc drops an unused `Symbol.for`, which webpack keeps: running it at build time would keep its key in the build's own symbol registry",
20292029
["oxc minifier: ecmascript/may_have_side_effects.rs:1259"]
2030+
],
2031+
[
2032+
"oxc's output is wrong: it renames a `#private` name a direct `eval` reads, so the `eval` throws a SyntaxError",
2033+
["oxc minifier: peephole/remove_unused_private_members.rs:27"]
20302034
]
20312035
];
20322036

0 commit comments

Comments
 (0)