Lesson 1 / 30
What are Babel and SWC?
Understand why JavaScript transpilers matter for modern development.
The transpilation problem
Modern JavaScript (ES6+) features aren't supported in older browsers. Transpilers convert new syntax into compatible older syntax that runs everywhere.
Transpiler vs Compiler
A compiler turns code into machine code. A transpiler turns source code into different source code — same language, different syntax. Babel transpiles JavaScript to JavaScript.
Babel vs SWC: speed and philosophy
Babel is written in JavaScript and powers most projects. SWC is written in Rust and built for speed — often 10-50x faster. Both solve the same problem; SWC is the modern, performance-first choice.
Choosing between Babel and SWC
Start with Babel for flexibility and ecosystem. Switch to SWC if build times exceed 30 seconds. Most modern frameworks (Next.js, Vite) default to SWC for new projects.