Transpiling

suggest change

Transpiling converts source code into source code at a similar level of abstraction. In JavaScript projects, it commonly means transforming newer syntax for older target runtimes or compiling another language, such as TypeScript, to JavaScript.

A transpiler does not automatically make every runtime API available. For example, converting syntax that uses Promise does not provide a Promise implementation to a target that lacks one. Projects may need separately selected polyfills, and some behavior cannot be reproduced perfectly in older runtimes.

Choose targets from the environments the application actually supports. Avoid transforming syntax merely because it is newer: unnecessary transforms can increase build complexity, output size, and debugging differences. Current tools such as Babel can select transformations from an explicit target configuration.

Transpilation is distinct from bundling and minification, although build tools often perform all three:

Source maps help debugging tools relate generated code back to its original source. Treat them as deployment artifacts with their own disclosure policy because they may expose source code.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents