Changelog: swc v1.1.42
#
Bugfixes#763)#
Dead code elimination (Previously, dead code elimination pass of swc
dropped some used imports. It was cause by iteration order.
In the code below,
after console.log(B)
and arr.map(...)
are evaluated, the import statement is visited and incorrectly dropped A
.
This is fixed by extracting import handling as a new phase. The new version of swc
does not drop imports while every other things are evaluated.