-
-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathmetro.config.js
More file actions
23 lines (19 loc) · 708 Bytes
/
metro.config.js
File metadata and controls
23 lines (19 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");
// eslint-disable-next-line no-undef
const defaultConfig = getDefaultConfig(__dirname);
const resolvers = {
"react-native-shared-element": "..",
};
// Add custom resolver and watch-folders because
// Metro doesn't work well with the link to the library.
defaultConfig.resolver.extraNodeModules = new Proxy(
{},
{
get: (_, name) => path.resolve(resolvers[name] || "./node_modules", name),
}
);
defaultConfig.watchFolders.push(path.resolve("./node_modules"));
defaultConfig.watchFolders.push(path.resolve(".."));
module.exports = defaultConfig;