brain/src/dev/web/front/babel-preset-stage-2.md
Wilfried OLLIVIER 0f5c52feb5 Add babelrc tip
2017-11-01 19:47:44 +01:00

19 lines
314 B
Markdown

# Babel and babel-preset-stage-2
If you want use the "Spead Operator" eg `...` in javascript, you need `babel-preset-stage-2`.
```shell
yarn add -D babel-preset-stage-2
```
Then enable it your babelrc :
```javascript
{
"presets": [
["es2015", { "modules": false }],
["stage-2"]
]
}
```