forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
34 lines (30 loc) · 934 Bytes
/
metro.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
// eslint-disable-next-line import/no-extraneous-dependencies
const blacklist = require('metro-config/src/defaults/exclusionList');
// Deny list is a function that takes an array of regexes and combines
// them with the default blacklist to return a single regex.
const blacklistRE = blacklist([
// react-native-animated-charts
/src\/react-native-animated-charts\/Example\/.*/,
/src\/react-native-animated-charts\/node_modules\/.*/,
'src.react-native-animated-charts.package.json',
// react-native-reanimated <patch>
/patches\/reanimated\/.*/,
]);
const transformer = {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: true,
inlineRequires: true,
},
}),
};
// Only run metro transforms on CI
if (process.env.CI) {
transformer.babelTransformerPath = require.resolve('./metro.transform.js');
}
module.exports = {
resolver: {
blacklistRE,
},
transformer,
};