-
Notifications
You must be signed in to change notification settings - Fork 637
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
Add custom serializer #309
Conversation
Codecov Report
@@ Coverage Diff @@
## master #309 +/- ##
=========================================
- Coverage 86.31% 86.3% -0.01%
=========================================
Files 163 163
Lines 4916 4908 -8
Branches 753 752 -1
=========================================
- Hits 4243 4236 -7
+ Misses 600 599 -1
Partials 73 73
Continue to review full report at Codecov.
|
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.
@mjesun has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…ation * upstream/master: (42 commits) Bump [email protected] Fix entryFile always is assumed to end with `.js` extension (facebook#310) Adds support for `publicPath` to enable serving assets from different locations. (facebook#299) Make dynamic import interoperable for CJS and ESM Add custom serializer (facebook#309) React sync for revisions 4773fdf...3ff2c7c metro-buck: disable inline IDs in dev mode Simplify helper function Rewrite traverseDependency-integration-tests to make them module resolution unit tests RN: Revert React 16.6 Sync React sync for revisions 4773fdf...bf9fadf Bump react-deep-force-update Use getFileIterator() from jest-haste-map Deploy Flow v0.85 to xplat/js metro-buck: add explicit import() prefetch feature jest: remove jasmine usages jest: upgrade to 24.0.0-alpha.4 Fix source map loading in the remote debugger Fix metro visualizer transformation Update babel to version 7 ...
Summary
We would like to bundle an entryfile differently than it is currently done in Metro, specifically in development. Without a pluggable serializer, we wouldn't be able to perform bundle splitting in development, which is impactful to our development speed.
This PR alleviates bundle sizing problem by introducing a customSerializer instead of using the
plainJSBundle
.Some minor question, do I have to implement this in the
build
public method in the server?Test plan
customSerializer
and test it against the new change in metro. Our bundle was able to do what we needed it to accomplish.