4 JavaScript Bundlers
K
Posted on January 21, 2018
After asking a few people what they want to know about JavaScript, it seemed to me that a major pain point is still the tooling. So todays article is about what options are out there to bundle up your code.
Webpack
The Classic. Many people complain it's too complicated or slow, but I still think it's a good choice.
It's very flexible and has a huge amount of plugins for every use-case you could imagine. It has a big community and is even part of the JS Foundation
On the other hand, I came from a very customized workflow with Gulp, which I could mostly replace by one Webpack config file.
Rollup.js
The Alternative. It focuses on the ES2015 module format and tries to get really small builds with the help of dead code elimination.
I think the config format is a bit simpler and the focus on one module format probably removes many possible ways that could lead to bugs.
At the moment it's probably the best alternative to Webpack, but I read that it is sold as especially appleasing for library development.
Parcel
The Simple. For all people who aren't into the whole configuration thing anyway, Parcel tries to give you "blazing fast" bundling without the need of any config.
In the fashion of the new wave of configless development, it is a good fit if you are new to JavaScript or only doing JavaScript once in a while.
I never tried it, but I guess I would for my next project, because, why spend time on stuff that simply works out of the box? Often I don't need to optimize my Webpack config anyway.
Microbundle
The Joker. If you're a serial library creator like Microbundles maker Jason you probably appreciate this gem.
It's build on top of Rollup.js and is mainly geared to ease some of the pain points of npm package creation.
While it's probably not for your next app, it will certainly help some of the OSS folks out there.
Conclusion
There are many more of these tools out there more or less often used by devs in the world, but I think if you just getting started, you'll probably be happy with one of those above.
Posted on January 21, 2018
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.