Skip to content

Commit 7234ab1

Browse files
committed
metro config: Turn on inline requires.
Done to follow the template-app change in facebook/react-native@959365a90, on the path to the RN v0.64 upgrade. This looks like the change that gets its own section in the RN v0.64 release announcement [1]. The RN commit links to the RN v0.59 release announcement [2]; that's the version where this became available, as an experimental feature. Both release announcements advertise a performance benefit. The changelog entry for v0.64 [3] warns of a breaking change: "slightly different JS execution order". I tested on the office Android device (debug build) and my own iPhone (debug and release builds), and I didn't see any issues after navigating around the app a bit. [1] https://reactnative.dev/blog/2021/03/12/version-0.64#inline-requires-enabled-by-default [2] https://reactnative.dev/blog/2019/03/12/releasing-react-native-059#-faster-app-launches-with-inline-requires [3] https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#v0640
1 parent 1939328 commit 7234ab1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.exports = {
7070
getTransformOptions: async () => ({
7171
transform: {
7272
experimentalImportSupport: false,
73-
inlineRequires: false,
73+
inlineRequires: true,
7474
},
7575
}),
7676
},

0 commit comments

Comments
 (0)