शब्दकोश · वेब डेवलपमेंट

Transpiler

A transpiler converts source code from one language or version into another at a similar level, such as modern JavaScript or TypeScript into older JavaScript.

अपडेट: अक्टूबर 6, 2026

A transpiler (source-to-source compiler) translates code written in one language or syntax version into another of similar abstraction. In web development it typically turns TypeScript, JSX or modern JavaScript into JavaScript that browsers can run.

Why it matters

It lets developers use new language features and typed languages while still reaching browsers that do not support them yet. Transpilation is a build step, so it adds tooling, and the code you debug in the browser differs from what you wrote unless source maps are used. Babel, TypeScript's compiler and SWC are common tools.

Example

Input:

const double = (x) => x * 2;

Output for an older target:

var double = function (x) { return x * 2; };

Syntax can be transformed this way, but missing browser features need a polyfill instead.

Common mistakes

  • Expecting a transpiler to add missing APIs. It rewrites syntax only.
  • Targeting very old browsers that no visitor uses, bloating the output.
  • Forgetting source maps for production debugging.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.