@@ -5,10 +5,17 @@ console.log('Patch react-devtools-core');
55
66const 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+ ) ;
1219shell . 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 / \( _ c o n s o l e [ 0 - 9 ] * = c o n s o l e \) .( l o g | w a r n | e r r o r ) .a p p l y \( _ c o n s o l e [ 0 - 9 ] * , \[ " \[ R e a c t D e v T o o l s \] " \] .c o n c a t \( a r g s \) \) / ,
2027 '' ,
21- rdStandalone
28+ rdStandalone ,
2229) ;
2330
2431console . log ( 'Patch react-dev-utils/launchEditor' ) ;
@@ -27,5 +34,5 @@ shell.sed(
2734 '-i' ,
2835 / r e q u i r e \( ' c h a l k ' \) / 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