Add Caveat section to Readme.md (#24) [skip ci]

* Add Caveat section to Readme.md

The Caveat section details some known issues and workaround when targeting specific environments and using specific plugins.

* fixes [skip ci]
This commit is contained in:
Paul Sanchez 2016-10-12 12:33:38 -05:00 committed by Henry Zhu
parent 417a9c8dc3
commit 4a3893a49e

View File

@ -38,7 +38,7 @@ $ npm install --save-dev babel-preset-env
The data for this is currently at: [/data/plugins.json](/data/plugins.json) and being generated by [/scripts/build-data.js](/scripts/build-data.js) using https://kangax.github.io/compat-table.
> We would like help to make the data is correct! This just means usage/testing!
> We would like help to make sure the data is correct! This just means usage/testing!
Currently: "chrome, edge, firefox, safari, node"
@ -137,3 +137,13 @@ transform-exponentiation-operator {}
transform-async-to-generator {}
syntax-trailing-function-commas {}
```
## Caveats
### Using `babel-plugin-transform-object-rest-spread` and targeting node.js 6.5 or higher
You may get a `SyntaxError: Unexpected token ...` error if using the [object-rest-spread](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-object-rest-spread) feature and targeting node.js 6.5 or higher.
This is a known issue at [babel/babel#4074](https://github.com/babel/babel/issues/4074).
A simple workaround would be to re-enable the following plugins: `babel-plugin-transform-es2015-destructuring` and `babel-plugin-transform-es2015-parameters`.