jargon

Comparison

PolyfillvsTranspilation

Polyfill

you loaded a script that defines the missing method on the global object so the rest of the code can call it.

Code that implements a missing platform API by installing it where the real one would be. It makes the feature available everywhere at the cost of shipping the implementation to browsers that already have it, unless it is loaded conditionally. Because it mutates globals, two polyfills for the same API can conflict, and a partial implementation can be worse than none by passing a feature detection it should fail.

Full entry →

Transpilation

you wrote modern syntax and the build rewrote it into something older browsers can parse.

Translating source into equivalent code using older syntax, so that a language feature can be used before every target browser supports it. It is syntax only: a new method like `Array.prototype.at` cannot be rewritten and needs a polyfill instead. Every year the target list stays unchanged, the output gets larger and slower relative to what modern browsers could have run directly.

Full entry →

Related comparisons