pkg VS Rollup

Compare pkg vs Rollup and see what are their differences.


Package your Node.js project into an executable (by vercel)


Next-generation ES module bundler (by rollup)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Sonar - Write Clean JavaScript Code. Always.
pkg Rollup
77 51
22,711 22,906
1.0% 0.8%
7.6 9.7
17 days ago 6 days ago
JavaScript JavaScript
MIT License GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of pkg. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-28.


Posts with mentions or reviews of Rollup. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-03.
  • What is your ideal setup for new project for solo developers
    6 projects | | 3 Feb 2023
    My go-to front end these days is Lit with web components, rollup, and web dev server.
  • How to use Firestore with Redux in a React application
    7 projects | | 25 Jan 2023
    With tools like webpack (used by create-react-app under the hood), your entire application needs to be bundled in a single file before it can be served to the browser. Vite, on the other hand, takes advantage of native ES modules in the browser to make bundling more efficient with Rollup, serving parts of the source code as needed.
  • Enhance your Docsify experience with your own plugin
    4 projects | | 9 Jan 2023
    We use Vite as a dev server. This allows you to take advantage of hot reloading in development and easily build and minify code with Rollup integration. Vitest is also provided, so you can write tests in the matching folder.
  • Introduction to React Suspense
    5 projects | | 27 Dec 2022
    In this project I use my favorite bundling tool called vite, It is a fast compiler & bundler, and it uses rollup under the hood.
  • Fixing Class Composition in Tailwind CSS
    10 projects | | 14 Dec 2022
    While not too long, css`@apply is a lot to repeat for every class you want to “compile”. That’s why using Vite and some Rollup plugins (Vite uses Rollup under the hood) I was able to shorten it into this:
  • Getting Tailwind to Work with Elm Book
    12 projects | | 28 Nov 2022
    Most front-end frameworks nowadays include these features as part of their CLI’s such as Create React App, Angular’s ng-cli, etc. For those that don’t, many will use a combination of some type of bundler like Parcel, Rollup, or Webpack and a browser refresher like livereload. This enables you to write code, save it, and immediately see the results. This in turn leads to fast feedback as you iterate all day in this build loop. The native Elm Reactor doesn’t offer this ability and elm-live fits the bill as a small Node.js library to enable this.
  • Front-end Guide
    54 projects | | 23 Nov 2022
  • Front end is Rife with Bad Ideas
    2 projects | | 1 Nov 2022
    Hey, thanks for the feedback. Sorry for being dismissive, I can rant when I am angry. :) I checked the new Redux and honestly, it's still a bit confusing. For eg,

    > export const { todoAdded, todoToggled } = todosSlice.actions

    Where is ".actions" coming from? Because in the object we have "reducers". Is it implicitly generated? Although boilerplate has been greatly reduced, it seems the project is still sticking to the same set of terms, just hidden from the plain sight. Ultimately, I want to understand why we need anything more than actions and state. You call actions, that update the state, that updates any component which is subscribe to that store. What am I missing?

    On Bundlers, my problem isn't the fact that they exist, but that you there isn't one that works easily out of the box. What compounds the problem is that practical examples are often missing from docs. This issue is a great example[1]. Crucial plugins are missing from the bundler. Even if you add plugins, you run into problem like sourcemap isn't being generated.


  • How I made my first successful open-source project
    7 projects | | 28 Oct 2022
    After a week (and some prompting), I decided to give it another shot. Once I changed the build tool I was using from microbundle to rollup (and published another 10 versions), I had a working package I was satisfied with. I shared it on a few of the relevant issues on the Chakra UI repo but quickly realized that the next step would be converting the whole thing to TypeScript.
  • Rollup Library Starter
    9 projects | | 5 Oct 2022
    In this post we'll take a look at how to package your JavaScript library code into a production-ready bundle using Rollup module bundler. By the end of this tutorial we will have a dual-module format bundle that is ready to be published to NPM, can be consumed in either server or browser environments, and is available in both ESM and CommonJS formats.

What are some alternatives?

When comparing pkg and Rollup you can also consider the following projects:

esbuild - An extremely fast bundler for the web

vite - Next generation frontend tooling. It's fast!

nexe - 🎉 create a single executable out of your node.js apps

tsup - The simplest and fastest way to bundle your TypeScript libraries.

webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

ncc - Compile a Node.js project into a single file. Supports TypeScript, binary addons, dynamic requires.

Snowpack - ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️ [Moved to:]

gulp - A toolkit to automate & enhance your workflow

parcel - The zero configuration build tool for the web. 📦🚀

reverse-engineering - List of awesome reverse engineering resources

Microbundle - 📦 Zero-configuration bundler for tiny modules.

browserify - browser-side require() the node.js way