Misc Question: How does this compare to tsup? #18
-
Thanks!!! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
They are similar bundlers, but I think the main differences are:
|
Beta Was this translation helpful? Give feedback.
They are similar bundlers, but I think the main differences are:
pkgroll is zero-config. It reads the entry-points declared in your
package.json
to determine how to bundle the package. tsup requires manual configuration.pkgroll is a thin abstraction over Rollup (just smartly configures it). Similarly, tsup is a thin abstraction over esbuild. pkgroll also uses esbuild for transformations & minification as a Rollup plugin, but the bundling & tree-shaking is done by Rollup (which is known to output best/cleanest code). However, when tsup emits type declaration, it also uses Rollup which eliminates the speed gains from using esbuild.
IIRC because tsup uses esbuild, the ESM to CJS compi…