Reproduction link or steps
https://bundler.sxzz.dev/#eNotjTEKgDAQBL9yXKUgEVvBzsbOB6QRiRKJd5KLhUj+biIpB3ZnXlyxx5VJAhi6T5g9X/BqAhitXG55YICuyTwJuyVYpp9mFlsgasoCdkY53qtsUOVcY4OcAm0LabLZXR2iSZM34faUO+mM8QP4WS5J
What is expected?
esbuild:
console.log(1 /* Display */);
What is actually happening?
var Prop = /* @__PURE__ */ function(Prop$1) {
Prop$1[Prop$1["Display"] = 1] = "Display";
Prop$1[Prop$1["Isolation"] = 2] = "Isolation";
Prop$1[Prop$1["Position"] = 3] = "Position";
return Prop$1;
}(Prop || {});
console.log(Prop.Display);
//#endregion
System Info
Any additional comments?
esbuild is smart. If const enum is exported, it will treat const enum as enum. Otherwise, it'll inline the value.
rolldown/tsdown#156
Reproduction link or steps
https://bundler.sxzz.dev/#eNotjTEKgDAQBL9yXKUgEVvBzsbOB6QRiRKJd5KLhUj+biIpB3ZnXlyxx5VJAhi6T5g9X/BqAhitXG55YICuyTwJuyVYpp9mFlsgasoCdkY53qtsUOVcY4OcAm0LabLZXR2iSZM34faUO+mM8QP4WS5J
What is expected?
esbuild:
What is actually happening?
System Info
Any additional comments?
esbuild is smart. If const enum is exported, it will treat
const enumasenum. Otherwise, it'll inline the value.rolldown/tsdown#156