AOE Technology RadarAOE Technology Radar

Babel

Adopt

We have been using babel for some time now. Since we have started using it, we don't have to struggle with unimplemented features of ECMAScript. In this regard, JavaScript is JavaScript, no matter what browser you are using. We strongly recommend using Babel or similar solutions (e.g. TypeScript).

Trial

Babel gives you the possibility to use the latest features from JavaScript (ECMAScript) in the browser of your choice.

Without Babel you had to use the feature set of your oldest browser or use feature detections such as modernizr or write polyfills on your own.

In general, Babel is split in 2 ways to bring you the new goodies you want.

  1. New syntax will be compiled to old EcmaScript 5 code e.g.:

  2. New globals and functions are provided by babel-polyfill e.g.:

The configuration is really simple due to the plugin system. You can choose which ECMAScript version and stage presets you want to use.

To know what you need you can practice ECMAScript 6 by doing it with es6katas and ask caniuse.

If you are using TypeScript, Babel is not necessary since you already get the new features with TypeScript.