While playing around with WebAssembly and rust, I stumbled across a plugin for an asset bundler I hadn't heard of before. Admittedly, my initial thought was "Dammit, why couldn't they just use webpack?" After all, webpack has served all my needs in the past and has seemingly become the defacto standard. "Time to roll up my sleeves and learn how to configure this thing..." I thought.
The first thing that struck me about Parcel is that there is no configuration file. In theory, I thought, that's great, but inevitably I'll need fine-grained control over something.
(Narrator: "He has yet to encounter such a scenario.")
Indeed, I've only used Parcel for two personal projects thus far, but I haven't had to configure anything at all. Everything Just Works™, and I've used it to do some relatively exotic things:
- Compiling rust to WebAssembly and bundling the resulting artifact
- Bundling and exposing markdown files as React components
require declarations. When it encounters HTML, it will transform
link tags. When it encounters CSS files, it transforms
According to the README on Parcel's github page, it's twice as fast as webpack when not caching assets, and nearly an order-of-magnitude faster when caching assets. It caches assets by default, and I have yet to encounter a situation where I've needed to turn off caching. Anecdotally, the numbers check out.
So, next time you're in need of an asset bundler, you should seriously consider Parcel.