Skip to content
This repository has been archived by the owner on Jun 8, 2019. It is now read-only.

Commit

Permalink
update readme for babel 7 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
bj00rn authored and redonkulus committed Sep 13, 2018
1 parent 4a562ff commit 26d93f2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# babel-plugin-react-intl

Extracts string messages for translation from modules that use [React Intl][].
## Dependencies

_**Note:** This Babel plugin works with React Intl v2.x, and **1.x of this plugin works with Babel 5, 2.x works with Babel 6**._
### React Intl
This Babel plugin works with React Intl v2.x

### Babel
- **3.x** of this plugin works with Babel 7
- **2.x** works with Babel 6
- **1.x** works with Babel 5

## Installation

Expand Down Expand Up @@ -47,7 +54,7 @@ If a message descriptor has a `description`, it'll be removed from the source af
The extract message descriptors are available via the `metadata` property on the object returned from Babel's `transform()` API:

```javascript
require('babel-core').transform('code', {
require('@babel/core').transform('code', {
plugins: ['react-intl']
}) // => { code, map, ast, metadata['react-intl'].messages };
```
Expand Down

0 comments on commit 26d93f2

Please sign in to comment.