forked from IjzerenHein/react-navigation-shared-element
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetro.config.js
More file actions
43 lines (39 loc) · 1.09 KB
/
Copy pathmetro.config.js
File metadata and controls
43 lines (39 loc) · 1.09 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
35
36
37
38
39
40
41
42
43
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
const path = require("path");
const resolvers = {
"react-navigation-shared-element": "..",
"@react-navigation/core": "../node_modules",
"@react-navigation/native": "../node_modules",
"@react-navigation/stack": "../node_modules",
"@react-navigation/routers": "../node_modules",
"@react-navigation/bottom-tabs": "../node_modules",
"@react-navigation/material-top-tabs": "../node_modules",
};
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
assetPlugins: ["expo-asset/tools/hashAssetFiles"],
},
// Add custom resolver and watch-folders because
// Metro doesn't work well with the link to the library.
resolver: {
extraNodeModules: new Proxy(
{},
{
get: (_, name) =>
path.resolve(resolvers[name] || "./node_modules", name),
}
),
},
watchFolders: [path.resolve("./node_modules"), path.resolve("..")],
};