3 ms·
Webpack and Rollup are similar, but are best for slightly different use cases. Rollup, as far as I know, is best when you're trying to bundle just ES6 modules.
by acemarke 10y ago
Webpack and Rollup are similar, but are best for slightly different use cases. Rollup, as far as I know, is best when you're trying to bundle just ES6 modules. Webpack supports a much wider variety of input formats, both built-in (CJS/AMD/ES6 modules) and through loaders.
At the moment, Webpack appears to be the most-used bundling tool for modern web apps. Rollup does produce smaller output, and seems to possibly be a better choice if you're developing a library rather than an application.
There are discussions going on about trying to leverage some of Rollup's capabilities in Webpack to get the best of both worlds.