DCX Technology RadarDCX Technology Radar

Babel

This item was not updated in last three versions of the Radar. Should it have appeared in one of the more recent editions, there is a good chance it remains pertinent. However, if the item dates back further, its relevance may have diminished and our current evaluation could vary. Regrettably, our capacity to consistently revisit items from past Radar editions is limited.
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.