From b371180b0f1b61368e4e85461e929c4548140a7c Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 18 Nov 2024 04:27:06 -0800 Subject: [PATCH] Exclude React Compiler runtime from inline requires (#1390) Summary: Similar to https://github.com/facebook/metro/pull/1126. This call is in every component on every render and it is not beneficial to inline it. On the contrary, you want to reduce the indirection there. Changelog: [Performance] Exclude React Compiler runtime from inline requires Changelog: Pull Request resolved: https://github.com/facebook/metro/pull/1390 Test Plan: Before: Screenshot 2024-11-17 at 18 01 25 After: Screenshot 2024-11-17 at 18 08 05 Reviewed By: GijsWeterings Differential Revision: D66075145 Pulled By: robhogan fbshipit-source-id: 11a12fbd04620bdb3e5b9320aca8a02c1f05803f --- packages/metro/src/lib/transformHelpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/metro/src/lib/transformHelpers.js b/packages/metro/src/lib/transformHelpers.js index 982b39e03d..0e56e5adab 100644 --- a/packages/metro/src/lib/transformHelpers.js +++ b/packages/metro/src/lib/transformHelpers.js @@ -41,6 +41,7 @@ const baseIgnoredInlineRequires = [ 'react', 'react/jsx-dev-runtime', 'react/jsx-runtime', + 'react-compiler-runtime', 'react-native', ];