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
When targeting ES2017, ESBuild will output public class fields like:
__publicField(this, "propName")
I am using Terser for post-processing with property mangling by Regex enabled. Terser is not able to recognise the string in the function argument as a property to mangle, which makes it incompatible.
The same could be achieved with:
__publicField(this,{propName: ''})
at a small cost of being more verbose and some runtime footprint to get Object.keys(arg)[0] It could be an option / not enabled by default.
Alternatively, is there a reason why Object.defineProperty is not used? This is something that Terser makes an exception for, TypeScript also outputs JS this way.
The text was updated successfully, but these errors were encountered:
When targeting ES2017, ESBuild will output public class fields like:
I am using Terser for post-processing with property mangling by Regex enabled. Terser is not able to recognise the string in the function argument as a property to mangle, which makes it incompatible.
The same could be achieved with:
at a small cost of being more verbose and some runtime footprint to get Object.keys(arg)[0] It could be an option / not enabled by default.
Alternatively, is there a reason why
Object.defineProperty
is not used? This is something that Terser makes an exception for, TypeScript also outputs JS this way.The text was updated successfully, but these errors were encountered: