Babel, the community driven compiler for writing next generation JavaScript

Babel helps you write the latest version of JavaScript, and is helping shape the future of the language itself. It's used at Facebook, Google, Netflix, and hundreds of other companies. It's downloaded more than 8 million times a month on npm.

When your target browsers (Chrome, Firefox, Safari, IE) don't support certain features natively, it helps you compile it down to a supported version.

In short, developers want to take advantage of the latest syntax in JavaScript before it's implemented in browsers, now. Because the version of JavaScript depends on the client's browser, we can't rely on the fact they are using an up to date browser.

Transition to Natively Support JavaScript

Babel abstracts the browser away so that you can worry about writing your application rather than trying to figure out what features are supported in each one.

For example: if you support an older browser such as Internet Explorer 9, it won't have any of the features in ECMAScript 2015 (ES6), so Babel will transform your code into ES5 which is supported.

[1, 2, 3].map(n => n + 2); // arrow functions!
[1, 2, 3].map(function (a) { // compiled to a regular function expression
  return a+2;
});

Efforts like https://github.com/babel/babel-preset-env means you can take advantage of the native browser support when possible.

Please read the tips below on how to get started and how to create a successful proposal!

lightbulb_outline View ideas list

Technologies

  • javascript
  • babel
  • nodejs

Topics

comment IRC Channel
mail_outline Contact email
close

2017