When comparing rollup.js vs systemjs, the Slant community recommends rollup.js for most people. In the question“What are the best RequireJS alternatives?” rollup.js is ranked 3rd while systemjs is ranked 5th. The most important reason people chose rollup.js is:
Tree shaking can significantly reduce the size of your bundle by getting rid of unused code from the libraries you are using.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Provides tree shaking
Tree shaking can significantly reduce the size of your bundle by getting rid of unused code from the libraries you are using.
Pro Reactjs droped Webpack and is now using rollup
Pro Outputs almost any module format
AMD, CommonJS, ES2015, Globals and UMD are all supported.
Pro Easy to configure
Rollup is very easy ton configure through a JSON file.
Pro Supports plugins
Rollup can be expanded just like webpack and browserify through the use of plugins. Plugins can do things such as transpilation (e.g. with Babel), import data from non JS places (like JSON files), etc.
Pro Can load static assets through plugins
System.js supports loading static assets such as images or stylesheets through loader plugins.
Pro Supports multiple module formats
SystemJS supports AMD, CommonJS and ES6 modules.
Cons
Con Relatively new
Rollup is still relatively new so it may be a bit harder to find information on how to do some things with it. In addition, that means that plugins can be a little scarce and it may be subject to minor changes as it matures.
Con Cannot use any npm module
Since SystemJS does not try to shim node built-ins and methods from modules, you cannot load any npm module in the browser and expect it to work with SystemJS.