-
Notifications
You must be signed in to change notification settings - Fork 0
/
metro.config.cjs
32 lines (30 loc) · 1.26 KB
/
metro.config.cjs
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 { getSentryExpoConfig } = require("@sentry/react-native/metro");
const path = require("node:path");
const config = getSentryExpoConfig(__dirname, { annotateReactComponents: true });
/** @type {import('metro-config').InputConfigT} */
module.exports = {
...config,
resolver: {
...config.resolver,
extraNodeModules: { crypto: require.resolve("react-native-quick-crypto") },
assetExts: config.resolver?.assetExts?.filter((extension) => extension !== "svg"),
sourceExts: [...(config.resolver?.sourceExts ?? []), "svg"],
blockList: [
...((config.resolver?.blockList &&
(Array.isArray(config.resolver.blockList) ? config.resolver.blockList : [config.resolver.blockList])) ??
[]),
new RegExp(path.join(__dirname, String.raw`\.\w+/`)),
new RegExp(path.join(__dirname, "android/")),
new RegExp(path.join(__dirname, "contracts/")),
new RegExp(path.join(__dirname, "build/")),
new RegExp(path.join(__dirname, "dist/")),
new RegExp(path.join(__dirname, "ios/")),
new RegExp(path.join(__dirname, "public/")),
new RegExp(path.join(__dirname, "server/")),
],
},
transformer: {
...config.transformer,
babelTransformerPath: require.resolve("react-native-svg-transformer/expo"),
},
};