-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Describe the feature
Given the following code:
enum D {
A,
B,
}
(D as any).A = 5;
console.log(D.A);swc 1.3.88 outputs 5 and 1.3.89 outputs 0. This is because swc started inlining enums within a module.
var D;
(function(D) {
D[D["A"] = 0] = "A";
D[D["B"] = 1] = "B";
})(D || (D = {}));
D.A = 5;
console.log(0);Is there a way to disable this optimization? Although unlikely, I'm concerned it might cause bugs in people's Deno code since it would be a breaking change.
Babel plugin or link to the feature description
No response
Additional context
No response