Skip to content

Commit

Permalink
metro config: Turn on inline requires.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chrisbobbe committed Aug 4, 2021
1 parent 1939328 commit 7234ab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
inlineRequires: true,
},
}),
},
Expand Down

0 comments on commit 7234ab1

Please sign in to comment.