intermediate
SWC
Use SWC for fast JavaScript and TypeScript transforms while separating syntax transforms from type checking.
SWC is a Rust-based compiler for fast JavaScript and TypeScript transforms, JSX, and minification. Frameworks like Next.js use SWC in their build pipelines to reduce feedback latency.
SWC handles syntax-level TypeScript—types are erased without semantic validation. Teams still run `tsc`, `typescript-eslint` type-aware rules, or equivalent checks.
On interviews: SWC versus Babel trade-offs, Next.js integration, minify role, and migration blockers from custom Babel plugins.
Common pitfalls: replacing Babel without auditing plugin parity; dropping typecheck because compile is fast; environment-specific SWC config drift.
The trade-off is compile performance versus Babel's transformation ecosystem.
Checklist:
- Keep semantic typecheck in CI.
- Benchmark real project transforms.
- Audit plugin compatibility before migration.
- Treat SWC as syntax layer, not linter.