Description
Rollup is a JavaScript module bundler. It takes small pieces of code written as ES modules and combines them into a larger file, such as an application or a library. The output can be ES modules, CommonJS, UMD, SystemJS and other formats, so the same code can be built for the web, for Node.js or for other platforms. Rollup applies tree-shaking, which removes code that is never used by analysing the execution paths of your modules. It can also split output into chunks based on entry points and dynamic imports, using the import mechanism of the output format. Behaviour is extended through a plugin API that transforms code during the build, and the configuration exposes many options for special build flows. Rollup is released under the MIT License and its source is public on GitHub. Vite uses Rollup for its production builds, with its own defaults and plugins on top.…
Highlights
- Outputs ES modules, CommonJS, UMD, SystemJS and more
- Tree-shaking removes unused code from the bundle
- Code-splitting by entry point and dynamic import
- Plugin API for custom transforms during the build
- Used as the production bundler behind Vite
Ratings & Reviews
No ratings yet
Be the first to rate rollup.js.
People also visit
rollup.js FAQ
Is Rollup free to use?
Yes. Rollup is released under the MIT License and its source code is public on GitHub.
What is tree-shaking?
Tree-shaking removes code that is never executed from the final bundle. Rollup analyses the execution paths of your modules to decide what can be dropped.
Which output formats does Rollup support?
ES modules, CommonJS, UMD and SystemJS, among others, so the same code can run in browsers or in Node.js.
Can I write my own plugins?
Yes. Rollup has a plugin API that lets you inject code and transform modules during the build. The documentation includes a guide on writing plugins.
Does Rollup support code-splitting?
Yes. It splits code based on entry points and dynamic imports, instead of relying on a custom loader.
What are the best rollup.js alternatives?
Popular alternatives to rollup.js include esbuild, Webpack and Gulp.js. See all rollup.js alternatives






