I am working on the Nextjs project and found that they have now used swc instead of babel. I am still confusing all the terminologies about what they do to make the compiling and bundling faster than 20x. Also, I am still wondering about the impact of webpack on this. Could anyone please explain these concepts to me? I'll appreciate it.
Asked
Active
Viewed 2,350 times
1
-
1I'm not really sure what exactly you want to know. swc is "designed to be a drop-in replacement for Babel", i.e. be capable of doing everything Babel does. It's built in Rust whereas Babel is – as far as I'm aware – mostly built in TypeScript. This could explain quite a significant performance boost. swc can be used with webpack, too, using the [`swc-loader` module](https://swc.rs/docs/usage/swc-loader). – isaactfa Aug 06 '22 at 17:30