|
10 | 10 |
|
11 | 11 | import type {ConfigT, InputConfigT} from 'metro-config'; |
12 | 12 |
|
| 13 | +import INTERNAL_CALLSITES_PATTERNS from './internalCallsites.json'; |
13 | 14 | import {getDefaultConfig as getBaseConfig, mergeConfig} from 'metro-config'; |
14 | 15 |
|
15 | 16 | export type {MetroConfig} from 'metro-config'; |
16 | 17 |
|
17 | 18 | const INTERNAL_CALLSITES_REGEX = new RegExp( |
18 | | - [ |
19 | | - '/Libraries/BatchedBridge/MessageQueue\\.js$', |
20 | | - '/Libraries/Core/.+\\.js$', |
21 | | - '/Libraries/LogBox/.+\\.js$', |
22 | | - '/Libraries/Network/.+\\.js$', |
23 | | - '/Libraries/Pressability/.+\\.js$', |
24 | | - '/Libraries/Renderer/implementations/.+\\.js$', |
25 | | - '/Libraries/Utilities/.+\\.js$', |
26 | | - '/Libraries/vendor/.+\\.js$', |
27 | | - '/Libraries/WebSocket/.+\\.js$', |
28 | | - '/src/private/renderer/errorhandling/.+\\.js$', |
29 | | - '/metro-runtime/.+\\.js$', |
30 | | - '/node_modules/@babel/runtime/.+\\.js$', |
31 | | - '/node_modules/@react-native/js-polyfills/.+\\.js$', |
32 | | - '/node_modules/invariant/.+\\.js$', |
33 | | - '/node_modules/react-devtools-core/.+\\.js$', |
34 | | - '/node_modules/react-native/index.js$', |
35 | | - '/node_modules/react-refresh/.+\\.js$', |
36 | | - '/node_modules/scheduler/.+\\.js$', |
37 | | - '^\\[native code\\]$', |
38 | | - ] |
| 19 | + INTERNAL_CALLSITES_PATTERNS |
39 | 20 | // Make patterns work with both Windows and POSIX paths. |
40 | 21 | .map(pathPattern => pathPattern.replaceAll('/', '[/\\\\]')) |
41 | 22 | .join('|'), |
|
0 commit comments