Lesson 29 / 30

Real-World 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.