You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output code should be pretty much the same as input code
Actual Behavior
Pretty much everything important gets accidentally removed:
'use strict';switch(foo){}
This is a reduced case of a bug that's causing ReactDOM to break in 1.25 (it's fine with 1.23, and was broken in 1.24 due to #3168) - the functional parts of commitAttachRef get removed: Reduced REPL version. It looks like 1.24 actually treats this behaviour fine - REPL - so perhaps this bug arose out of the fix for #3168.
The text was updated successfully, but these errors were encountered:
Thanks a lot for spotting this. The issue was a simple oversight with weird effects that only showed in very particular situations. To be precise, the switch statement is included due to a side-effect in the condition (in this case because it is an unknown global) at a point where the cases themselves have no side-effect (because the console.log is not yet included) resulting in no code after the switch statement being included, preventing the side-effect (in fact, the statement was treated like a throw). Fix at #3178
How Do We Reproduce?
The following code gets aggressively tree-shaken and all the functional parts get removed:
REPL version
Expected Behavior
Output code should be pretty much the same as input code
Actual Behavior
Pretty much everything important gets accidentally removed:
This is a reduced case of a bug that's causing ReactDOM to break in 1.25 (it's fine with 1.23, and was broken in 1.24 due to #3168) - the functional parts of
commitAttachRef
get removed: Reduced REPL version. It looks like 1.24 actually treats this behaviour fine - REPL - so perhaps this bug arose out of the fix for #3168.The text was updated successfully, but these errors were encountered: