-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathreact-native.config.js
More file actions
45 lines (43 loc) · 1.26 KB
/
Copy pathreact-native.config.js
File metadata and controls
45 lines (43 loc) · 1.26 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
44
45
const project = (() => {
try {
const { configureProjects } = require("react-native-test-app");
return configureProjects({
android: {
sourceDir: "android",
packageName: "com.microsoft.reacttestapp"
},
ios: {
sourceDir: "ios",
},
windows: {
sourceDir: "windows",
solutionFile: "windows/example.sln",
},
});
} catch (_) {
return undefined;
}
})();
// Workaround: react-native-nitro-image's NitroImagePackage extends
// BaseReactPackage, which @react-native-community/cli@13's autolinking regex
// does not detect. Without this override, autolinking returns android: null
// for nitro-image and vision-camera's gradle build fails with
// "Project with path ':react-native-nitro-image' could not be found".
const path = require("path");
module.exports = {
...(project ? { project } : undefined),
dependencies: {
"react-native-nitro-image": {
platforms: {
android: {
sourceDir: path.join(
__dirname,
"../../node_modules/react-native-nitro-image/android",
),
packageImportPath: "import com.margelo.nitro.image.NitroImagePackage;",
packageInstance: "new NitroImagePackage()",
},
},
},
},
};