Command Palette

Search for a command to run...

position in category
#4

Module bundler that compiles small pieces of JavaScript into larger libraries or applications. Built around ES modules as the input format, it statically analyzes imports and outputs optimized bundles in multiple formats, from web to Node.js.

Rollup pioneered efficient tree-shaking by treating the entire module graph as a single abstract syntax tree with shared bindings. Compared to CommonJS-based bundlers, this yields smaller outputs because only actually used code is included. The plugin API has been adopted by Vite for production builds and by WMR, making it a core dependency of modern frontend tooling.

Key capabilities:

  • Tree-shaking through static analysis, excluding unused code at build time
  • Multiple output formats: ES modules, CommonJS, UMD, SystemJS, IIFE
  • Code-splitting via entry points and dynamic imports without extra overhead
  • Plugin system with a straightforward API for transforms and code injection
  • Import of existing CommonJS modules through official plugins

Teams use Rollup to publish npm libraries with minimal bundle size, to build applications that ship lean production bundles, or to compile a single codebase for web and Node.js. It integrates with the CLI, JavaScript API, or as the production bundler behind Vite. Developers writing future-proof ES module code can target older environments by outputting CommonJS or UMD.

GitHub Repositories
1.1K
-5.3%
Trending down this week
Removed in 64 repos