Babel 5.0: the JavaScript transpiler enabling ES6+ everywhere

Babel 5.0 (March 2015) by Sebastian McKenzie: JavaScript transpiler (formerly 6to5) enabling writing ES2015+ and targeting older browsers and Node.js. Plugin architecture, source maps, automatic polyfills.

Open SourceWebR&D BabelSebastian McKenzieTranspilerJavaScriptES6FrontendOpen Source

The ES5 → ES6 gap

The ES2015 (ES6) standard was finalising in 2015 with substantial novelties — let/const, arrow functions, classes, template literals, destructuring, modules, promise, async/await (ES2017). Production browsers and Node.js only supported ES5. Developers needed a transpiler converting ES6+ to compatible ES5.

6to5, launched in 2014 by Sebastian McKenzie (then a nineteen-year-old Australian), solves this. In February 2015 the project is renamed Babel to reflect broader ambition (not only ES6, but universal JavaScript translator). Version 5.0 is of 31 March 2015.

MIT licence.

Plugin architecture

Babel is structured as a pipeline:

  1. Parser (Acorn-based) — input code AST
  2. Transformations — plugins modifying the AST
  3. Generator — AST → target JS code

Each plugin handles a specific transformation (ES6 arrow functions → ES5 function, ES6 classes → ES5 prototype-based, etc.). Presets (preset-env, preset-react, preset-typescript) are plugin collections.

Main features

  • Transpilation ES2015+, ES2016+, ES2017+, stage proposals
  • Source maps for original-source debugging
  • JSX transform (for React)
  • Flow type stripping (static typing pre-TypeScript)
  • TypeScript transform (via @babel/preset-typescript)
  • Polyfills via @babel/polyfill / core-js

Expected impact

Babel is enabling the transition to modern JavaScript in browsers: the pairing with Webpack (Webpack orchestrates, Babel transpiles) is bound to become the standard frontend stack in the coming years.

In the Italian context

Babel is rapidly entering Italian frontend teams: every new React project — and soon Vue, Angular — adopts it as the default transpiler.


References: Babel 5.0 (31 March 2015). Sebastian McKenzie. MIT licence. Acorn parser. Broad plugin ecosystem.

Need support? Under attack? Service Status
Need support? Under attack? Service Status