Skip to content

Commit fec0512

Browse files
committed
Remove backend patch of react-devtools-core
1 parent 4cc6a8d commit fec0512

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

scripts/patch-modules.js

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,13 @@ const path = require('path');
33

44
console.log('Patch react-devtools-core');
55

6-
// backend vender is backward compatibility for RN <= 0.42
7-
// the problem related to https://github.com/facebook/react-devtools/pull/749
8-
// fixed in core v2.3 but have no patch in the backend vender
9-
const rdBackend = path.join(
10-
__dirname,
11-
'../dist/node_modules/react-devtools-core/vendor/backend-1.0.6.js'
12-
);
13-
shell.sed(
14-
'-i',
15-
'window.requestIdleCallback',
16-
'window.__REQUEST_IDLE_CALLBACK_REPLACED_BY_PATCH__',
17-
rdBackend
18-
);
19-
shell.sed(
20-
'-i',
21-
'window.cancelIdleCallback',
22-
'window.__CANCEL_IDLE_CALLBACK_REPLACED_BY_PATCH__',
23-
rdBackend
24-
);
25-
266
const rdStandalone = path.join(
277
__dirname,
288
'../dist/node_modules/react-devtools-core/build/standalone.js'
299
);
3010
// Hide source map of react-devtools-core
3111
// for optimize chrome devtools
32-
shell.sed(
33-
'-i',
34-
'//# sourceMappingURL=standalone.js.map',
35-
'',
36-
rdStandalone
37-
);
12+
shell.sed('-i', '//# sourceMappingURL=standalone.js.map', '', rdStandalone);
3813
// Avoid logging from react-devtools-core
3914
// log: connected, disconnected
4015
// error: listening error (can be seen directly in the panel)

0 commit comments

Comments
 (0)