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
Current behaviour of esm.sh seems to be erasing the class/function names, e.g. export class Price { ... } would be transpiled into var t = class {}; export { t as Price } which makes mahPrice.constructor.name return "t" instead of "Price".
Esbuild supports --keep-names which solves this problem; however, there is currently no way of enabling it with esm.sh.
The text was updated successfully, but these errors were encountered:
inca
changed the title
Support esbuild --keep-names to prevent Ccass/function names erasing
Support esbuild --keep-names to prevent class/function names erasing
May 30, 2022
As stated in evanw/esbuild#931, evanw/esbuild#510 and elsewhere, sometimes it is undesirable to have class names erased.
Current behaviour of esm.sh seems to be erasing the class/function names, e.g.
export class Price { ... }
would be transpiled intovar t = class {}; export { t as Price }
which makesmahPrice.constructor.name
return"t"
instead of"Price"
.Esbuild supports --keep-names which solves this problem; however, there is currently no way of enabling it with esm.sh.
The text was updated successfully, but these errors were encountered: