/
babel.config.js
35 lines (32 loc) · 1 KB
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Load variables from the local env generated by AppCenter
// which is currently the only dependency using this
require('dotenv').config();
const platform =
// Default to react-native platform
'react-native';
module.exports = api => {
api.cache(true);
return {
'react-native': {
presets: ['module:metro-react-native-babel-preset']
},
web: {
// See /lib/herbalife-ui-kit/.storybook/webpack.config.js
},
appium: {
presets: ['module:metro-react-native-babel-preset'],
// This plugin was created as a workaround for the issue
// with appium not finding testID properties in React Native ecosystem
plugins: [
[
'jsx-property-alias',
{
properties: {
testID: 'accessibilityLabel'
}
}
]
]
}
}[platform];
};