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

Switch UMD build to Fiber #9026

Closed
wants to merge 4 commits into from
Closed

Switch UMD build to Fiber #9026

wants to merge 4 commits into from

Conversation

dsblv
Copy link
Contributor

@dsblv dsblv commented Feb 18, 2017

Follow-up to #9015.

This PR switches UMD builds (react-dom.js and react-dom.min.js) to use ReactDOMFiber as an entry-point and removes -fiber builds altogether.

The change breaks examples/fiber and I intend to fix it with separate PR.

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.

We also need a strategy for the "React with addons" build. I propose to delete it completely and move Perf to be an export on ReactDOM in (available only development). TestUtils doesn't need to be in a UMD build at all.

@@ -206,7 +206,7 @@ var addonsMin = {
// The DOM Builds
var dom = {
entries: [
'./build/node_modules/react-dom/lib/ReactDOMUMDEntry.js',
'./build/node_modules/react-dom/lib/ReactDOMFiber.js',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should keep this line as it is but change what ReactDOMUMDEntry exports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable.

I'm a little confused by the module resolution system. Does require("ReactDOM") in UMDEntery points to the specific file or to the whole ReactDOM package (which is already exporting Fiber)?

The latter would mean that UMD build featured Fiber before this change. Which is false. Ok I got it.

@dsblv
Copy link
Contributor Author

dsblv commented Feb 18, 2017

I propose to delete it ["React with addons" build] completely and move Perf to be an export on ReactDOM

Im open to implementing this, just not sure if it's directly related to/blocking this PR. Is it?

@gaearon
Copy link
Collaborator

gaearon commented Feb 20, 2017

Hmm, you're probably right that it doesn't block.

@gaearon
Copy link
Collaborator

gaearon commented Feb 20, 2017

If I look at react-dom.js after this change, it appears that it includes both Stack and Fiber implementations. My guess is this may be caused by requiring either TestUtils or ReactPerf (or maybe both). Can you look into why this happens?

@dsblv
Copy link
Contributor Author

dsblv commented Mar 2, 2017

Hey! I'm sorry for my mysterious disappearance. I'll try to solve this ASAP.

One weird thing I see after rebasing to master is that UMD bundles fell back to exposing Stack. Guess it's due to #9078?

I can confirm that bundle contains both implementations, but commenting out Perf and TestUtils did't seem to help. Investigation continues...

@trueadm
Copy link
Contributor

trueadm commented Mar 8, 2017

Let's hold off on this PR for now? Given the work that's currently going on with flat bundles and the build is likely to conflict with this PR.

@gaearon
Copy link
Collaborator

gaearon commented Mar 8, 2017

Yea, we’ll probably not go that road as we’re switching our build process.
Thanks for the PR though!

@gaearon gaearon closed this Mar 8, 2017
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.

5 participants