I’ll introduce the story that esbuild does not support transpiling to ES5.
I was looking for a tool that could easily transpile to ES5. I investigated whether esbuild could achieve this, but it seems it doesn’t support transpiling to ES5.
esbuild - An extremely fast JavaScript bundler
ESBuild doesn't transpile your code down to ES5.Source: ESBuild doesn’t transpile your code down to ES5. If you’re using any ES6 feature… | Hacker News
That’s all from the Gemba about wanting to transpile to ES5 with esbuild.