From 959365a90216ee14d0f8b5d2f4653a1ab4c10d7e Mon Sep 17 00:00:00 2001 From: Gant Laborde Date: Wed, 26 Aug 2020 02:45:33 -0700 Subject: [PATCH] Change default metro.config.js to utilize inline requires (#29770) Summary: This feature has been in [experimental mode since 0.59.0](https://reactnative.dev/blog/2019/03/12/releasing-react-native-059#-faster-app-launches-with-inline-requires). The feature seems quite beneficial. Most people won't know to look for the inline requires flag, and it's been existing in React Native as an experiment for months. This defaults the flag to true as the next step towards utilizing this optimization for React Native devs initiating brand new projects. ## Changelog [General] [Breaking] - Enable `inlineRequires` by default. Gives a performance benefit but slightly different JS execution order Pull Request resolved: https://github.com/facebook/react-native/pull/29770 Reviewed By: cpojer Differential Revision: D23338113 Pulled By: TheSavior fbshipit-source-id: 1b8ff41418c81a324335782d4b4109d89594ccbf --- template/metro.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/metro.config.js b/template/metro.config.js index 13a964217f20a0..e91aba937cd579 100644 --- a/template/metro.config.js +++ b/template/metro.config.js @@ -10,7 +10,7 @@ module.exports = { getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, - inlineRequires: false, + inlineRequires: true, }, }), },