Well, it's not banned at least. So what we can do here and why we did it in the end is we want to make sure that the Rust-based bundler also works well with the JavaScript ecosystem. How we did this is we added a few more leverages for plugin authors. And one of the things is hook filters for plugins. So plugins work as they are, but then you have to call the JavaScript plugin for each file for each check, and that's a bit meh, right? So instead, we said, look, let's say we have this very simple rolldown or rollup plugin. They're incompatible, right? They're compatible. So let's create a new framework called Swangular. And we just say, OK, transform something. If the ID doesn't end with Swangular, then return. And otherwise do some actual transformation. Yeah, Swangular is a great name, I know. But the problem is this transform function is called for every single file, and that's a lot of files, I tell you, in your Node modules.
So instead, what we do is, well, we take this, but we extract it into a filter function to say, OK, just run this if ID includes Swangular. And now this can also be parsed by Rust so Rust doesn't have to call it all the time and say, OK, only for these conditions, and we're good. And that's the magic behind it. So lower overheads, and it works in rolldown, read, and even in rollup. Yeah, it's important everywhere, right? And if it's not there, it's fine. It will just be ignored. Also, feed's got, well, Rustified, of course, so native Rust plugins are covered. Things like module resolution, yeah, finding all of these aliases, et cetera, et cetera. TypeScript JSX transform, just mentioned it before.
Defined replacements, right? Like nodes n, for example. Import metaglob, if you need a certain expression, therefore. All dynamic import variables, so things like import pages and then the name, .js or with the template syntax here. So and that's not the end, of course. We did it with the bundler. We have the underlying, well, minifier, transformer, etc. And based on that, we have a linter and a formatter. All of that together, you can actually use in a tool chain called V+. But that's time for another talk. And that's all about it. Thank you for your attention. Thanks, everybody. Bye-bye. Thanks, everyone.
Comments