|
1 | 1 | #babel-plugin-react-intl |
2 | 2 |
|
3 | 3 | Extracts string messages for translation from modules that use[React Intl][]. |
| 4 | +##Dependencies |
4 | 5 |
|
5 | | -_**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**._ |
| 6 | +###React Intl |
| 7 | +This Babel plugin works with React Intl v2.x |
| 8 | + |
| 9 | +###Babel |
| 10 | +-**3.x** of this plugin works with Babel 7 |
| 11 | +-**2.x** works with Babel 6 |
| 12 | +-**1.x** works with Babel 5 |
6 | 13 |
|
7 | 14 | ##Installation |
8 | 15 |
|
@@ -47,7 +54,7 @@ If a message descriptor has a `description`, it'll be removed from the source af |
47 | 54 | The extract message descriptors are available via the`metadata` property on the object returned from Babel's`transform()` API: |
48 | 55 |
|
49 | 56 | ```javascript |
50 | | -require('babel-core').transform('code', { |
| 57 | +require('@babel/core').transform('code', { |
51 | 58 | plugins: ['react-intl'] |
52 | 59 | })// => { code, map, ast, metadata['react-intl'].messages }; |
53 | 60 | ``` |
|