Ignore more files/packages by default in LogBox (#38217)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38217

Marks more filename patterns as "internal call sites" which has the effect of collapsing them by default in LogBox (and skipping them for the purpose of providing a code frame).

Changelog: [General][Fixed] Hide Babel helpers and other core files from LogBox stack traces by default

Reviewed By: cortinico, huntie

Differential Revision: D47230876

fbshipit-source-id: fe2d59d975c61cbdfd7b8da42288e284f3ab0739
This commit is contained in:
Moti Zilberman
2023-07-06 09:20:40 -07:00
committed by Facebook GitHub Bot
parent ff40138c76
commit af73a75c21
+12 -8
View File
@@ -14,20 +14,24 @@ const {getDefaultConfig: getBaseConfig, mergeConfig} = require('metro-config');
const INTERNAL_CALLSITES_REGEX = new RegExp(
[
'/Libraries/Renderer/implementations/.+\\.js$',
'/Libraries/BatchedBridge/MessageQueue\\.js$',
'/Libraries/YellowBox/.+\\.js$',
'/Libraries/Core/.+\\.js$',
'/Libraries/LogBox/.+\\.js$',
'/Libraries/Core/Timers/.+\\.js$',
'/Libraries/WebSocket/.+\\.js$',
'/Libraries/Network/.+\\.js$',
'/Libraries/Pressability/.+\\.js$',
'/Libraries/Renderer/implementations/.+\\.js$',
'/Libraries/Utilities/.+\\.js$',
'/Libraries/vendor/.+\\.js$',
'/node_modules/react-devtools-core/.+\\.js$',
'/node_modules/react-refresh/.+\\.js$',
'/node_modules/scheduler/.+\\.js$',
'/Libraries/WebSocket/.+\\.js$',
'/Libraries/YellowBox/.+\\.js$',
'/metro-runtime/.+\\.js$',
'/node_modules/@babel/runtime/.+\\.js$',
'/node_modules/event-target-shim/.+\\.js$',
'/node_modules/invariant/.+\\.js$',
'/node_modules/react-devtools-core/.+\\.js$',
'/node_modules/react-native/index.js$',
'/metro-runtime/.+\\.js$',
'/node_modules/react-refresh/.+\\.js$',
'/node_modules/scheduler/.+\\.js$',
'^\\[native code\\]$',
].join('|'),
);