It won't. UglifyJS's dead code elimination is snake oil and mirrors anywhere but in the most trivial of cases.
See:
- https://github.com/webpack/webpack/issues/2867
- https://github.com/webpack/webpack/issues/4784
(Note: webpack doesn't do any dead code elimination, it relies on UglifyJS to do so)