-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathbabel.config.js
34 lines (34 loc) · 977 Bytes
/
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
module.exports = {
env: {
web: {
ignore: ['**/native', '**/*.native.js', '**/*.test.jsx'],
presets: [['@babel/preset-env', { loose: true }], '@babel/preset-react'],
plugins: ['inline-react-svg', 'import-glob'],
},
esm: {
presets: [
['@babel/preset-env', { loose: true, modules: false }],
'@babel/preset-react',
],
plugins: ['inline-react-svg', 'import-glob'],
},
native: {
ignore: ['**/*.test.jsx'],
only: ['**/native', '**/*.native.js'],
presets: [
['@babel/preset-env', { loose: true }],
'@babel/preset-react',
'module:metro-react-native-babel-preset',
],
plugins: ['import-glob'],
},
test: {
plugins: ['import-glob', '@babel/plugin-transform-flow-strip-types'],
presets: [
['@babel/preset-env', { loose: true }],
'@babel/preset-react',
'module:metro-react-native-babel-preset',
],
},
},
};