# Real-World Scenarios — Babel & SWC

Source: https://www.geekswithgeeks.com/en/babel-swc/bs-interview-scenarios

> Practical questions you might face in interviews.

## Scenario: Build time is too long

You have a large React project with 5000+ files. Babel transpilation takes 45 seconds on each build. How would you optimize? Answer: Consider SWC for 10-50x speedup, check if node_modules are excluded, enable Babel caching.

## Scenario: App works locally but breaks in IE11

Your app uses ES6 features and Promise. Babel transpiles syntax, but Promise is missing in IE11. Solution: Add `core-js` polyfills with `useBuiltIns: 'usage'` in Babel config.

## Scenario: TypeScript project has no type checking

Your team uses TypeScript but Babel strips types silently. A colleague ships code with a typo in a property name — it compiles fine but crashes at runtime. Solution: Run `tsc --noEmit` in CI pipeline; add type checking to pre-commit hooks.
