-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmetro.config.js
More file actions
34 lines (30 loc) · 1.02 KB
/
metro.config.js
File metadata and controls
34 lines (30 loc) · 1.02 KB
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
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
/*
* XXX: Metro config is able to fetch the default config from the react-native package just fine,
* but the linter is not able to resolve these imports.
*/
/* eslint-disable import/no-extraneous-dependencies,import/no-unresolved */
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const blacklist = require('metro-config/src/defaults/exclusionList');
const { lockdownSerializer } = require('@lavamoat/react-native-lockdown');
/* eslint-enable import/no-extraneous-dependencies,import/no-unresolved */
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('@react-native/metro-config').MetroConfig}
*/
const config = {
resolver: {
blacklistRE: blacklist([
/node_modules\/.*\/node_modules\/react-native\/.*/,
]),
},
serializer: lockdownSerializer({ hermesRuntime: true }),
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);