compiling this typescript code with esbuild 0.21.0 ```ts const t = { get passive ( ) { return false; } } console.log(t); ``` generate this javascript ```js var t = { get passive: /* @__PURE__ */ __name(function() { return false; }, "passive") }; console.log(t); ``` this is syntactically incorrect ``` get passive: _name(xxx) ^ here ``` with these options: ```json "bundle": true, "format": "esm", "platform": "browser", "charset": "utf8", "keepNames": true, "target": "esnext" ```
Activity
eco747 commentedon May 7, 2024
This probleme was not present in 0.20.x version
This is due to keepnames=true, if I use keepNames=false, obviously the problem disapear.
GentileFulvio commentedon May 7, 2024
Same issue here
evanw commentedon May 7, 2024
Thanks for the report. Working on it.
fix evanw#3756: regression with `--keep-names`