One bundler through them all. So you're like, why is there another bundler? Why can't we use one of these that exists already? Or like TurboPack, what Tobias talked about earlier, or Webpack, et cetera. Well, it's complicated, right? First of all, multiple bundlers under the hood, of course, complexity. It's a big problem for the Vite maintainers, the contributors, but also the developers, because it introduces inconsistencies between development and between production, which sucks. Then there's also limitations. Some bundlers say, oh, we don't know how to implement A, B, C. So neither rollup nor ASBuilt wanted to introduce certain features, because they said, hey, that's out of scope. And that's fine, but these are features, Vite and maybe all you need. And then of course, time. We also know back in the days, the Webpack times would take a long time. Now builds are faster, but they could be even faster now. So of course what we do, we rerun everything in Rust. We are 10x developers. Let's go. Jokes aside, time to meet rolldown.
And yes, that just rolled down on purpose. So rolldown itself is more than just like, hey, let's take rollup and port it to Rust, because it's not that easy. Instead, we decided to combine the best parts that we have of prior art. So rollup's API, all the plug-ins are still compatible, right, very important. You don't really have to migrate things away and over. That would be like a huge churn for everybody. Speed and also behavior for me is built, right? Things like inject, define, et cetera. And also we inspired, we got inspired by Webpack to have some more advanced chunking. So you can make sure your JavaScript applications are as performant as possible. You can split them up in files as needed.
And there's also more, of course, more features, like module types, lazy barrel optimization, built-in HMR, input map generation, et cetera, et cetera, et cetera. There's a lot. And also, of course, there's built-in minifier and transformers. You can have syntax lowering, or your TypeScript is being transferred over to JavaScript, and your code is minified, so you have a very performant bundle in the end. So that's what rolldown can do.
Comments