When you’re starting a Vite
project, it gives you two choices for handling JavaScript or TypeScript: one’s just "JavaScript/TypeScript,"
and the other’s "JavaScript/TypeScript + SWC."
Basically, it’s asking how you want Vite to process your code.
- JavaScript/TypeScript (Default): This one uses **Babel**
, a trusty tool that’s been around forever. It takes your modern code and makes it work on older browsers. It’s super flexible with tons of plugins, but it can be a bit slow but it has a huge community.
- JavaScript/TypeScript + SWC: This uses **SWC**
, a newer, lightning-fast tool built in Rust. It’s fast and great for modern code and speeds up your builds, but it’s not as customizable as Babel plus community is less.