What's the difference between babel-preset-stage-0, babel-preset-stage-1 etc?

flyingzl picture flyingzl · May 16, 2016 · Viewed 38.6k times · Source

My question is : What's the difference between babel-preset-stage-0,babel-preset-stage-1,babel-preset-stage-2 and babel-preset-stage-3, and what's the best choice when we develop with ES6?

Answer

CodingIntrigue picture CodingIntrigue · May 16, 2016

Babel's stage presets equate to the TC39 Process and the different states of each proposal for a potential language change. They include implementations and polyfills for all of the proposed changes in that stage.

Anything currently in Stage-0 is Strawman, not ES6. It is future Javascript and absolutely not certain that it will ever make it into any official ECMAScript specification.

Please do not just set to stage-0 so it will work without understanding the consequences this will have.

The Babel Preset which contains only ES6 features is preset-es2015