Skip to content
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

[Flight] Dedupe modules #20172

Merged
merged 1 commit into from Nov 11, 2020
Merged

[Flight] Dedupe modules #20172

merged 1 commit into from Nov 11, 2020

Conversation

@sebmarkbage
Copy link
Member

@sebmarkbage sebmarkbage commented Nov 6, 2020

This adds a custom host config for extracting a unique get from a module reference (typically just the module name).

For www/Relay, we'll assume that the reference object itself has already been deduped.

@sebmarkbage sebmarkbage requested a review from gaearon Nov 6, 2020
@codesandbox
Copy link

@codesandbox codesandbox bot commented Nov 6, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6abc5b1:

Sandbox Source
React Configuration
@sizebot
Copy link

@sizebot sizebot commented Nov 6, 2020

Warnings
⚠️ Build job for base commit is still pending: 76a6dbc

Size changes (stable)

Generated by 🚫 dangerJS against 6abc5b1

@sizebot
Copy link

@sizebot sizebot commented Nov 6, 2020

Details of bundled changes.

Comparing: 76a6dbc...6abc5b1

react-transport-native-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightNativeRelayServer-dev.js +1.7% +1.7% 24.28 KB 24.7 KB 6.55 KB 6.66 KB RN_FB_DEV
ReactFlightNativeRelayServer-prod.js 🔺+1.3% 🔺+1.1% 13.5 KB 13.68 KB 3.61 KB 3.65 KB RN_FB_PROD

react-transport-dom-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightDOMRelayServer-dev.js +1.7% +1.7% 24.43 KB 24.84 KB 6.44 KB 6.55 KB FB_WWW_DEV
ReactFlightDOMRelayServer-prod.js 🔺+1.4% 🔺+1.2% 13.1 KB 13.28 KB 3.51 KB 3.55 KB FB_WWW_PROD

react-transport-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-transport-dom-webpack-plugin.js 0.0% +0.3% 437 B 437 B 297 B 298 B NODE_ES2015
react-transport-dom-webpack.production.min.js 0.0% 🔺+0.1% 3.9 KB 3.9 KB 1.75 KB 1.75 KB UMD_PROD
react-transport-dom-webpack-server.node.development.js +1.2% +0.9% 24.71 KB 25.01 KB 6.78 KB 6.84 KB NODE_DEV
react-transport-dom-webpack-server.browser.development.js +1.2% +0.9% 25.32 KB 25.64 KB 6.66 KB 6.72 KB UMD_DEV
react-transport-dom-webpack-server.node.production.min.js 🔺+1.6% 🔺+1.0% 6.17 KB 6.27 KB 2.53 KB 2.55 KB NODE_PROD
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.6% 🔺+1.1% 6.18 KB 6.28 KB 2.59 KB 2.62 KB UMD_PROD
react-transport-dom-webpack-server.browser.development.js +1.3% +0.9% 23.77 KB 24.07 KB 6.53 KB 6.59 KB NODE_DEV
react-transport-dom-webpack-server.browser.production.min.js 🔺+1.7% 🔺+1.1% 5.97 KB 6.07 KB 2.5 KB 2.53 KB NODE_PROD

react-server

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-flight.development.js +1.3% +0.9% 24.2 KB 24.52 KB 6.65 KB 6.71 KB NODE_DEV
react-server-flight.production.min.js 🔺+2.1% 🔺+1.6% 6.21 KB 6.34 KB 2.58 KB 2.62 KB NODE_PROD
react-server.production.min.js 0.0% 🔺+0.2% 1.16 KB 1.16 KB 649 B 650 B NODE_PROD

Size changes (experimental)

Generated by 🚫 dangerJS against 6abc5b1

@gaearon
gaearon approved these changes Nov 6, 2020
Copy link
Member

@gaearon gaearon left a comment

Do you want to add some snapshot tests for the protocol itself somewhere for basic coverage against accidents?

@sebmarkbage sebmarkbage force-pushed the sebmarkbage:reusemodules branch from 05a8772 to 6abc5b1 Nov 11, 2020
@sebmarkbage sebmarkbage merged commit 163199d into facebook:master Nov 11, 2020
1 of 3 checks passed
1 of 3 checks passed
ci/circleci: setup CircleCI is running your tests
Details
ci/codesandbox Building packages...
Details
Facebook CLA Check Contributor License Agreement is valid!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.