When Webpack first caught attention in the industry it was a clear game-changer. This was quite some time ago, so forgive me if I’m remembering incorrectly, but I’m pretty sure there was nothing quite like it before. MV* frameworks were still newish, and jQuery was still viewed as a universally viable option for vast numbers of engineers as well. So as you can imagine, bundling wasn’t on the top of everyone’s mind.
Looking today, you can see how much growth and influence Webpack has garnered over the industry. While Webpack has been the forefront runner in bundling, it is not the only option. There is another: Rollup. While not as popular, Rollup is a powerful bundling option and something that probably should be considered more today. Let’s take a look at what it is, and why you should start using it.
What Is Rollup
So as you can expect from earlier in the article, the final output in Rollup is a single file. The power here is that Rollup allows for various format types for your output, based on your needs. These being amd, cjs, es, iife, umd, and system. From these options, you can specify the output that works best for the use case with the repo you’re working in.
Of course, expect us to go into more detail later.
While this article wasn’t the longest, its purpose isn’t meant to be overflowing with information. Rollup is a powerful bundler, that allows for a high degree of flexibility. The type of power that we need more and more as JS projects begin to scale upwards everywhere and our needs are becoming more complex.