Lesson 2 / 31

When Do You Need a Transpiler?

Decide when a project needs transpilation, from legacy browser support to JSX, TypeScript and library builds.

Browser compatibility requirements

If your app must support legacy browsers or old mobile WebViews, transpilation is mandatory. Modern apps targeting current browsers often skip most of it, but build tools still include it by default.

Frontend, backend, and libraries

Frontend web apps almost always transpile. Backend Node.js apps might not if using Node 16+. Libraries transpile to support consumer environments. npm packages often include pre-transpiled code.

The default is always to transpile

Most build tools (Webpack, Vite, esbuild) include Babel or SWC by default. You configure what to transpile, not whether. It's built in.

Development vs production transpilation

In development, you might skip transpilation for faster rebuilds (browsers support modern syntax). In production, transpile for maximum compatibility.