Good call out from that thread is he's trying to get a small change in esbuild added to help with this as well.
https://github.com/evanw/esbuild/issues/4419
Yes; hope that gets blessed. We shall see.