-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathbabel.config.js
More file actions
32 lines (31 loc) · 889 Bytes
/
Copy pathbabel.config.js
File metadata and controls
32 lines (31 loc) · 889 Bytes
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
const getAliasConfig = require('./config/import-aliases');
module.exports = {
presets: ['babel-preset-expo'],
plugins: [
['module-resolver', { alias: getAliasConfig().babel }],
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-transform-named-capturing-groups-regex',
['transform-inline-environment-variables', { include: ['RUNNING_E2E_TESTS', 'USE_STORYBOOK'] }],
'react-native-worklets/plugin'
],
overrides: [
{
// Babel merges an override's plugins with the root list instead of replacing them,
// so the compiler must live here with `exclude` to stay out of jest setup and tests.
exclude: /(jest\.setup\.js|\.(test|spec)\.(js|jsx|ts|tsx))$/,
plugins: [
[
'babel-plugin-react-compiler',
{
compilationMode: 'infer'
}
]
]
}
],
env: {
production: {
plugins: ['transform-remove-console']
}
}
};