5.0.0 Released

In the past few months Babel has been welcomed into several major communities such as Node, React, Ember, Backbone, Angular, Rails, and many others. We launched the Users page only a few weeks ago and it’s really cool to see everyone that is using it. Companies like CloudFlare, Netflix, Mozilla, and Yahoo!. Projects like Ghost, Atom, Mapbox, and so many more.

We’ve seen tons of blog posts, talks, events, courses all about ES6+ using Babel, and official Babel tools have been downloaded nearly 2 million times.

And as usual if you run into any regressions please report them immediately.

TC39 Process

In this release you’ll start to see us aligned with the TC39 process. The TC39 is the technical committee from ECMA that writes the ECMAScript standard. Their process is categorised into 5 stages:

Stage 0 - Strawman

Stage 1 - Proposal

Stage 2 - Draft

Stage 3 - Candidate

Stage 4 - Finished

Proposals that are stage 2 or above are enabled in Babel by default. Now this does not mean that they’re guaranteed to be included in future ECMAScript specifications or even Babel itself. Stage 2 is considered a good point for inclusion by default in Babel due to their relative maturity and need for critical proposal feedback.

.babelrc

Babel 5.0.0 has support for .babelrc out of the box across its entire range of integrations. This means that it will work across babel/register, babel-node as well as across the entire range of build system plugins and module loaders such as babel-loader, babelify, and others.

Removed Features

The playground has been removed so development can be focussed on mainstream ES features and proposals. This also reduces the risk of syntactic conflicts preventing certain official features from being implemented.

Abstract references have been removed as the proposal has been superseded. Support for one or more of the superseding proposals may be implemented in the future.

In closing, we hope that you are now as excited about this release as we are. There’s a lot that went into it, and we believe this will set us up for a long time into the future.

— The Babel team

Imports are now hoisted

In 4.x, imports were inlined as where they appeared in the code. Which means that this code:

global.test = 'test'
import './test'

would compile to:

'use strict';
global.test = 'test';
require('./test');

However, from 5.x on, this behaviour has been changed in order to comply with the ES6 spec and imports willnow be hoisted. What this means in practical code is that the snippet above will get converted to something like:

'use strict';
require('./test');
global.test = 'test';

If your code required certain bits and pieces to be executed in between a specific module being imported -which might be the case while testing code and you need to fake some window properties :)- you may want to extract that away into its own file and import it before the code that needs it.