-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Lazy bundling #605
Merged
Merged
RFC: Lazy bundling #605
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cortinico
reviewed
Feb 27, 2023
EvanBacon
reviewed
Feb 27, 2023
## Unresolved questions | ||
|
||
* User-facing naming: Are we happy with "lazy bundling" as the name for this feature? | ||
* APIs: Are we happy with `lazy=true` and `__loadBundleAsync` as the names for the new integration points between React Native and Metro? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__loadBundleAsync
seems analogous to __webpack_require__.l
(require.l
(that's an L
)). The concept of adding it to the require runtime seems elegant.
EvanBacon
reviewed
Feb 27, 2023
eps1lon
reviewed
Mar 6, 2023
Co-authored-by: Nicola Corti <corti.nico@gmail.com>
facebook-github-bot
pushed a commit
to facebook/metro
that referenced
this pull request
Mar 21, 2023
Summary: Changelog: [Internal] Enables Flow in `Server-test`, `baseBytecodeBundle-test`, `baseJSBundle-test` and `getRamBundleInfo-test`, to unblock additional changes to the serializer in support of [lazy bundling](react-native-community/discussions-and-proposals#605). Reviewed By: jacdebug Differential Revision: D44184128 fbshipit-source-id: 53981514e17c901f351b3d2bb40b7ffaf5e875a6
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Mar 21, 2023
Summary: Changelog: [General][Removed] Remove internal DevSplitBundleLoader native module `DevSplitBundleLoader` was part of an experimental bundling strategy that offloaded Hermes bytecode compilation to the packager server. The React Native parts of this experiment were never part of the public API, and the Metro parts never fully shipped in open source. As part of implementing the simpler and more general [lazy bundling RFC](react-native-community/discussions-and-proposals#605), we are removing `DevSplitBundleLoader` and associated code from React Native's internals. Reviewed By: robhogan Differential Revision: D43597007 fbshipit-source-id: 1460e9045cd7a0f5ef43144b10afb932172e223c
robhogan
approved these changes
Mar 28, 2023
huntie
approved these changes
Apr 3, 2023
facebook-github-bot
pushed a commit
to facebook/metro
that referenced
this pull request
Apr 4, 2023
Summary: Changelog: * **[Experimental]**: Pass full path and query params to `asyncRequire` for lazy bundles. Moves the responsibility for setting query params on lazy bundle requests from the runtime to the serializer. This is a breaking change to any `asyncRequire` implementations currently relying on the experimental second parameter. See the [lazy bundling RFC](react-native-community/discussions-and-proposals#605) for more context. Note that replacing `asyncRequire` using `asyncRequireModulePath` will itself be deprecated with the introduction of the `__loadBundleAsync` runtime hook. Reviewed By: robhogan Differential Revision: D43597023 fbshipit-source-id: 8943cfee04abd5f7e23b5cbb2047d401c728fe14
jeongshin
pushed a commit
to jeongshin/react-native
that referenced
this pull request
May 7, 2023
Summary: Changelog: [General][Removed] Remove internal DevSplitBundleLoader native module `DevSplitBundleLoader` was part of an experimental bundling strategy that offloaded Hermes bytecode compilation to the packager server. The React Native parts of this experiment were never part of the public API, and the Metro parts never fully shipped in open source. As part of implementing the simpler and more general [lazy bundling RFC](react-native-community/discussions-and-proposals#605), we are removing `DevSplitBundleLoader` and associated code from React Native's internals. Reviewed By: robhogan Differential Revision: D43597007 fbshipit-source-id: 1460e9045cd7a0f5ef43144b10afb932172e223c
OlimpiaZurek
pushed a commit
to OlimpiaZurek/react-native
that referenced
this pull request
May 22, 2023
Summary: Changelog: [General][Removed] Remove internal DevSplitBundleLoader native module `DevSplitBundleLoader` was part of an experimental bundling strategy that offloaded Hermes bytecode compilation to the packager server. The React Native parts of this experiment were never part of the public API, and the Metro parts never fully shipped in open source. As part of implementing the simpler and more general [lazy bundling RFC](react-native-community/discussions-and-proposals#605), we are removing `DevSplitBundleLoader` and associated code from React Native's internals. Reviewed By: robhogan Differential Revision: D43597007 fbshipit-source-id: 1460e9045cd7a0f5ef43144b10afb932172e223c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This RFC introduces lazy bundling, a DevX feature that is currently in use at Meta and makes bundling faster when developing large apps with many screens. The RFC describes the changes required to Metro and React Native, and the ways in which these changes will support future developments around bundle splitting and Server Components.
The open source version of this feature is in development and should ready in time for React Native 0.73.
View the rendered RFC