Skip to content

Misc Question: How does this compare to tsup? #18

Answered by privatenumber
jessekrubin asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jessekrubin
Comment options

Answer selected by jessekrubin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #17 on July 08, 2022 05:44.