Rollup is a module bundler for JavaScript created by Rich Harris and first released in 2015. As its own documentation puts it, Rollup compiles small pieces of code into something larger and more complex, such as a library or an application. Where many earlier bundlers grew up around CommonJS modules, Rollup was designed from the start around the standardized ES module format, encouraging developers to write code with modern import and export syntax.
The feature most associated with Rollup is tree-shaking. Because ES modules describe their imports and exports statically, Rollup can analyze the code being imported and exclude anything that is not actually used. The documentation frames this as more effective than minification alone: instead of merely compressing dead code, Rollup leaves it out of the bundle entirely, which is especially valuable for libraries that want to ship lean output.
Rollup’s emphasis on clean, standards-based output made it a popular choice for authoring JavaScript libraries, where small bundle size and predictable module structure matter more than the application-oriented features of larger bundlers. Its plugin system let it consume non-standard inputs and integrate with the wider toolchain while keeping the core focused on the ES module model.
Rollup gained a much broader audience as the production engine inside Vite. While Vite served source code over native ES modules during development, it turned to Rollup for production builds, using Rollup’s mature optimization and tree-shaking to produce the final assets shipped to users. This pairing put Rollup at the center of a generation of new front-end projects even when developers were not configuring it directly.
By demonstrating that bundling could be built natively around ES modules and that aggressive dead-code elimination belonged in the bundler itself, Rollup influenced how the JavaScript community thought about output size and module standards. Its design fed directly into later tooling, including efforts to build faster, unified bundlers that carry forward Rollup’s tree-shaking heritage.