Skip to content

[Flight] Move Flight DOM to a Webpack Specific Package #17372

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

Merged
merged 5 commits into from
Nov 15, 2019

Conversation

sebmarkbage
Copy link
Collaborator

We'll have Webpack specific coupling so we need to ensure that it can be versioned separately from various Webpack versions. We'll also have builds for other bundlers in the future.

There's a matrix of configurations that include the server environment (node vs browser streams), client environment (browser vs RN), format (DOM vs RN), bundler (Webpack, Parcel, Rollup...) and possibly others. Each yielding a possible new build.

In practice, we only use a few of those combinations to create optimal builds.

Technically, the server doesn't have to be Webpack specific if the Babel transform is, but it might be good to have the transform be agnostic. E.g. it allows for the Node env and Webpack compile in parallel. So therefore I think it's better that the transform is agnostic and then we replace it with bundle meta data at runtime using a Webpack specific server.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 15, 2019

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 1af0410:

Sandbox Source
elegant-rgb-03n8p Configuration

@sizebot
Copy link

sizebot commented Nov 15, 2019

Details of bundled changes.

Comparing: 532810a...1af0410

react-flight-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-flight-dom-webpack-server.browser.development.js n/a n/a 0 B 9.31 KB 0 B 3.06 KB UMD_DEV
react-flight-dom-webpack-server.browser.production.min.js n/a n/a 0 B 2.84 KB 0 B 1.33 KB UMD_PROD
react-flight-dom-webpack.development.js n/a n/a 0 B 8.71 KB 0 B 2.6 KB UMD_DEV
react-flight-dom-webpack.production.min.js n/a n/a 0 B 2.89 KB 0 B 1.34 KB UMD_PROD
react-flight-dom-webpack.development.js n/a n/a 0 B 8.54 KB 0 B 2.55 KB NODE_DEV
react-flight-dom-webpack.production.min.js n/a n/a 0 B 2.72 KB 0 B 1.28 KB NODE_PROD
react-flight-dom-webpack-server.node.development.js n/a n/a 0 B 10 KB 0 B 3.27 KB NODE_DEV
react-flight-dom-webpack-server.node.production.min.js n/a n/a 0 B 2.81 KB 0 B 1.29 KB NODE_PROD
ReactFlightDOMClient-dev.js 0.0% +0.1% 8.45 KB 8.45 KB 2.51 KB 2.52 KB FB_WWW_DEV
react-flight-dom-webpack-server.browser.development.js n/a n/a 0 B 9.1 KB 0 B 3.02 KB NODE_DEV
react-flight-dom-webpack-server.browser.production.min.js n/a n/a 0 B 2.65 KB 0 B 1.26 KB NODE_PROD
ReactFlightDOMServer-dev.js -0.3% -0.1% 10.01 KB 9.98 KB 3.25 KB 3.24 KB FB_WWW_DEV

Size changes (experimental)

Generated by 🚫 dangerJS against 1af0410

@sizebot
Copy link

sizebot commented Nov 15, 2019

Details of bundled changes.

Comparing: 532810a...1af0410

react-flight-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-flight-dom-webpack-server.browser.production.min.js n/a n/a 0 B 2.64 KB 0 B 1.25 KB NODE_PROD
react-flight-dom-webpack.development.js n/a n/a 0 B 8.7 KB 0 B 2.59 KB UMD_DEV
react-flight-dom-webpack.production.min.js n/a n/a 0 B 2.87 KB 0 B 1.33 KB UMD_PROD
react-flight-dom-webpack-server.node.development.js n/a n/a 0 B 9.99 KB 0 B 3.26 KB NODE_DEV
react-flight-dom-webpack-server.node.production.min.js n/a n/a 0 B 2.8 KB 0 B 1.28 KB NODE_PROD
react-flight-dom-webpack-server.browser.development.js n/a n/a 0 B 9.3 KB 0 B 3.06 KB UMD_DEV
react-flight-dom-webpack-server.browser.production.min.js n/a n/a 0 B 2.83 KB 0 B 1.33 KB UMD_PROD
react-flight-dom-webpack-server.browser.development.js n/a n/a 0 B 9.09 KB 0 B 3.01 KB NODE_DEV
react-flight-dom-webpack.development.js n/a n/a 0 B 8.52 KB 0 B 2.55 KB NODE_DEV
react-flight-dom-webpack.production.min.js n/a n/a 0 B 2.7 KB 0 B 1.27 KB NODE_PROD

Size changes (stable)

Generated by 🚫 dangerJS against 1af0410

@sebmarkbage sebmarkbage force-pushed the webpack branch 2 times, most recently from f17ec52 to 7afac56 Compare November 15, 2019 08:28
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"webpack": "^4.41.2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a peer?

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be a peer but otherwise seems fine.

We'll have Webpack specific coupling so we need to ensure that it can be
versioned separately from various Webpack versions. We'll also have builds
for other bundlers in the future.
@sebmarkbage sebmarkbage merged commit 39dbb14 into facebook:master Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants