It’ll take a lot to replace esbuild for me -- it’s fast enough that it’s never the bottleneck and more importantly has always been absolutely rock-solid and reliable. So a tool that’s 2x faster but less reliable isn’t appealing.
Presumably those will get fixed over time, and at some point bun will just work if you want to replace your existing bundler. But even then, I personally would lean to sticking with esbuild as it’s more than fast enough for my purposes -- extra speed isn’t a compelling selling point (for me).
Gotta go with libre tools for these cases unfortunately. Nothing against Bun specifically of course, just the concept of capital + dev tools is something that must be re-learned as evil time and time again.
Roll-up for libs and webpack for apps. Only thing that works for me and all the wonky edge cases involved in building for web and node and npm and old browsers and various file types and loaders and whatnot.