-
Notifications
You must be signed in to change notification settings - Fork 2
/
.babelrc
12 lines (9 loc) · 1.41 KB
/
.babelrc
1
2
3
4
5
6
7
8
9
10
11
12
{
presets: ['@babel/react', '@babel/env', ['@babel/stage-2', {"decoratorsLegacy": true}]]
/*
Babel uses these "presets" to know how to transpile your Javascript code. Here's what we're saying with these:
'react': teaches Babel to recognize JSX - a must have for React!
'env': teaches Babel to transpile Javascript . This preset is highly configurable, and you can reduce the size of your bundle by limiting the number of features you transpile. Learn more here: https://github.com/babel/babel-preset-env
'stage-2': teaches Babel to recognize EcmaScript language features that have reached "stage 2" in the process of approval for inclusion in the official EcmaScript specification (called the "TC39 process"). There are 5 stages in the process, starting at 0 (basically a brand new proposal) going up to 4 (finished and ready for inclusion). Read more about it here: http://2ality.com/2015/11/tc39-process.html. Using new language features before they're officially part of EcmaScript is fun, but it also carries a risk: sometimes proposed features can change substantially (or be rejected entirely) before finally being included in the language, so if you jump on the bandwagon too early, you risk having your code be dependent on defunct/nonstandard syntax! "Stage 2" is a fairly safe place to start - after stage 2, the feature is well on its way to official inclusion and only minor changes are expected.
*/
}