Repository navigation
Commit f634529
committed
fix(javascript): annotate a chain's member link only where the chain ends there
Marking every link, as the commit before this did, mangles a property terser
keeps: `/*@__MANGLE_PROP__*/ this.keepthis.manglethis` is one mark on the last
link, because terser's parser annotates a `.` or `[…]` link by annotating
whatever the rest of the chain returns. A call annotates itself, so it keeps
its own mark, and a link built over a member takes that member's.
terser also marks the chain wrapper of `this.a?.b.c`, which is left as it is:
nothing reads an annotation there, and the output of each optional-chain shape
is byte for byte terser's either way.1 parent 0e7aaf3 commit f634529
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14647 | 14647 | | |
14648 | 14648 | | |
14649 | 14649 | | |
| 14650 | + | |
| 14651 | + | |
| 14652 | + | |
| 14653 | + | |
| 14654 | + | |
| 14655 | + | |
| 14656 | + | |
14650 | 14657 | | |
14651 | 14658 | | |
14652 | 14659 | | |
| |||
0 commit comments