Files
TechRadarAJR/radar/2017-10-01/babel.md
2017-09-08 22:53:55 +02:00

2.3 KiB

title, ring, quadrant
title ring quadrant
Babel trial languages-and-frameworks

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

Without Babel in the backbone; 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.