Search for a command to run...
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:
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.