Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8716d32

Browse files
feat: update sourcemaps.gradle
1 parent f8e6579 commit 8716d32

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

plugin/src/withInstabug.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@ import { withInstabugIOS } from './withInstabugIOS';
55

66
export interface PluginProps {
77
name?: string;
8+
enable?: boolean;
89
}
910

10-
const withInstabugPlugin: ConfigPlugin<PluginProps | void> = (config, props) => {
11+
const withInstabugPlugin: ConfigPlugin<PluginProps> = (config, props) => {
1112
let cfg = config;
12-
try {
13-
cfg = withInstabugAndroid(cfg, {
14-
...props,
15-
name: instabugPackage.name,
16-
});
17-
} catch (e) {
18-
console.warn(`There was a problem with configuring your native Android project: ${e}`);
19-
}
20-
21-
try {
22-
cfg = withInstabugIOS(cfg, {
23-
...props,
24-
name: instabugPackage.name,
25-
});
26-
} catch (e) {
27-
console.warn(`There was a problem with configuring your native iOS project: ${e}`);
13+
if (props.enable === true) {
14+
try {
15+
cfg = withInstabugAndroid(cfg, {
16+
...props,
17+
name: instabugPackage.name,
18+
});
19+
} catch (e) {
20+
console.warn(`There was a problem with configuring your native Android project: ${e}`);
21+
}
22+
try {
23+
cfg = withInstabugIOS(cfg, {
24+
...props,
25+
name: instabugPackage.name,
26+
});
27+
} catch (e) {
28+
console.warn(`There was a problem with configuring your native iOS project: ${e}`);
29+
}
2830
}
2931

3032
return cfg;

0 commit comments

Comments
 (0)