One of Esbuild's Design principles is to Maximize parallelism
https://github.com/evanw/esbuild/blob/main/docs/architecture.md#design-principles
Which is great, and typically carries over into how people are writing esbuild plugins.
However when you use tsup and with build for multiple formats ['cjs', 'esm']: tsbuild runs the same esbuild-plugin, twice in parrallell.
I suspect esbuild-plugin developers don't image that happening, since they are developing for esbuild and not tsup.
I've run into a problem, because two copies of the same esbuild-plugin are writing to the same file, leading to a corrupt file:
jfortunato/esbuild-plugin-manifest#14
Perhaps there should be a generic solution in tsup to prevent this from happening?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too