Related to #1437, a function in code:
class Foo {
foo() {
let add = (e) => console.log(e);
add("x");
}
}
becomes:
var Foo = class {
foo() {
let add = /* @__PURE__ */ __name((e) => console.log(e), "add");
add("x");
}
};
when bundled with --bundle --keep-names --format=esm options.
However, __name function is not in the scope when the class is stringified by toString() and then eval()'ed again. An anonymous function like add above does not need to have .name property if it did not have one in code.
Related to #1437, a function in code:
becomes:
when bundled with
--bundle --keep-names --format=esmoptions.However,
__namefunction is not in the scope when the class is stringified by toString() and then eval()'ed again. An anonymous function likeaddabove does not need to have .name property if it did not have one in code.