Skip to content

Commit

Permalink
Change default metro.config.js to utilize inline requires (facebook#2…
Browse files Browse the repository at this point in the history
…9770)

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
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Breaking] - Enable `inlineRequires` by default. Gives a performance benefit but slightly different JS execution order

Pull Request resolved: facebook#29770

Reviewed By: cpojer

Differential Revision: D23338113

Pulled By: TheSavior

fbshipit-source-id: 1b8ff41418c81a324335782d4b4109d89594ccbf
  • Loading branch information
GantMan authored and philippeauriach committed May 5, 2021
1 parent 5d6c1c8 commit 5c86a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
inlineRequires: true,
},
}),
},
Expand Down

0 comments on commit 5c86a8b

Please sign in to comment.