September 2018
Intermediate to advanced
764 pages
20h 6m
English
Browserify and Webpack focus on CommonJS modules, and require a Babel plugin to support ES6 modules. Rollup supports native ES6 modules out of the box.
Rollup also supports tree-shaking, a feature that eliminates unused code from the bundle. Let's say you are importing a large utility library supporting 100 functions, but are only using four of them; tree-shaking will remove the 96 that are not required for our app. This can significantly reduce bundle size for applications that have a lot of dependencies.
Traditionally, the community consensus is to use Webpack for applications, and Rollup for libraries. There are two reasons for this:
Read now
Unlock full access