mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
const env = process.env.BABEL_ENV || process.env.NODE_ENV;
|
|
const configs = {
|
|
env: {
|
|
development: {
|
|
presets: ['module:metro-react-native-babel-preset'],
|
|
plugins: [
|
|
'@babel/plugin-transform-named-capturing-groups-regex',
|
|
'react-native-reanimated/plugin',
|
|
"@babel/plugin-transform-export-namespace-from"
|
|
]
|
|
},
|
|
test: {
|
|
presets: ['module:metro-react-native-babel-preset'],
|
|
plugins: [
|
|
'@babel/plugin-transform-named-capturing-groups-regex',
|
|
'react-native-reanimated/plugin',
|
|
["@babel/plugin-transform-private-methods", { "loose": true }]
|
|
]
|
|
},
|
|
production: {
|
|
presets: ['module:metro-react-native-babel-preset'],
|
|
plugins: [
|
|
'transform-remove-console',
|
|
'@babel/plugin-transform-named-capturing-groups-regex',
|
|
'react-native-reanimated/plugin',
|
|
"@babel/plugin-transform-export-namespace-from"
|
|
]
|
|
}
|
|
}
|
|
};
|
|
module.exports = function (api, opts) {
|
|
api.cache(true);
|
|
if (!env) env = 'production';
|
|
return configs.env[env];
|
|
};
|