Skip to content

Commit b308cac

Browse files
committed
babel 7 instructions, fixes #113
1 parent 0842090 commit b308cac

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ a `.babelrc` file.
3939
}
4040
```
4141

42-
Or for react-native:
42+
For recent react-native versions, add it as a plugin in `babel.config.js`:
4343

44-
```
45-
{
46-
"env": {
47-
"production": {
48-
"plugins": ["babel-plugin-root-import"]
49-
}
50-
}
44+
```js
45+
module.exports = (api) => {
46+
api.cache(true);
47+
48+
return {
49+
plugins: [
50+
'babel-plugin-root-import',
51+
],
52+
};
5153
}
5254
```
5355

0 commit comments

Comments
 (0)