forked from rainbow-me/rainbow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.js
36 lines (32 loc) · 1.07 KB
/
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
35
36
// eslint-disable-next-line import/no-extraneous-dependencies
const blacklist = require('metro-config/src/defaults/exclusionList');
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
// 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');
}
const rainbowConfig = {
resolver: {
blacklistRE,
},
transformer,
};
module.exports = mergeConfig(getDefaultConfig(__dirname), rainbowConfig);