egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.48k stars 209 forks source link

Should esbuild be a peer depedency? #1032

Open eyeree opened 8 months ago

eyeree commented 8 months ago

I'm using tsup apis as part of a build system that includes custom esbuild plugins. Unless my package and the tsup package resolve to the same version of esbuild, I get TypeScript compile errors about the Plugin types not being compatible (apparently this type changed in new esbuild versions). If esbuild was a peer dependency, then it would ensure that the same version is used. Alternatively, I can override the version of esbuild that tsup uses in my package.json but that would break in subtle ways if tsup takes a dependency on a newer version of esbuild, while a change in the required version of a peer dependency would be much more obvious and easier to fix.

Upvote & Fund

Fund with Polar