Skip to content

Commit a4c74d6

Browse files
authored
Add more message for DevTools v3 incompatible message (#488)
1 parent 80ef55b commit a4c74d6

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

scripts/patch-modules.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@ console.log('Patch react-devtools-core');
55

66
const rdStandalone = path.join(
77
__dirname,
8-
'../dist/node_modules/react-devtools-core/build/standalone.js'
8+
'../dist/node_modules/react-devtools-core/build/standalone.js',
99
);
1010
// Hide source map of react-devtools-core
1111
// for optimize chrome devtools
12+
shell.sed(
13+
'-i',
14+
'DevTools v3 is incompatible with this version of React',
15+
'DevTools v3 is incompatible with this version of React' +
16+
', you need manually upgrade React Native Debugger to v0.11. (Please visit the Release page)',
17+
rdStandalone,
18+
);
1219
shell.sed('-i', '//# sourceMappingURL=standalone.js.map', '', rdStandalone);
1320
// Avoid logging from react-devtools-core
1421
// log: connected, disconnected
@@ -18,7 +25,7 @@ shell.sed(
1825
// eslint-disable-next-line
1926
/\(_console[0-9]* = console\).(log|warn|error).apply\(_console[0-9]*, \[ "\[React DevTools\]" \].concat\(args\)\)/,
2027
'',
21-
rdStandalone
28+
rdStandalone,
2229
);
2330

2431
console.log('Patch react-dev-utils/launchEditor');
@@ -27,5 +34,5 @@ shell.sed(
2734
'-i',
2835
/require\('chalk'\)/g,
2936
'{red:f=>f,cyan:f=>f,green:f=>f}',
30-
path.join(__dirname, '../node_modules/react-dev-utils/launchEditor.js')
37+
path.join(__dirname, '../node_modules/react-dev-utils/launchEditor.js'),
3138
);

0 commit comments

Comments
 (0)