-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Build renderers into their individual npm packages #7168
Conversation
7c6a95c
to
f1e947c
Compare
The next step would be to flat bundle these. One benefit of this is that we don't actually have to use As long as we use the I'm still a bit skeptical of the copying strategy because it delays use of smart build systems (optimizing compilers like closure compiler, emscripten for hot paths, Reason, etc) if we're limited to also getting those systems integrated into the downstreams. |
f1e947c
to
09bb6e8
Compare
We might want to build the fiber renderer as its own standalone npm package that anyone can use to build a renderer. That would be great for React ART, and therefore anyone building a renderer in an external repo. We only really need the duplication for the existing stateful DI. |
👍 I think this would be amazing for learning and experimentation! |
770b799
to
cccb686
Compare
Without this we end up bundling all of the isomorphic React into the DOM bundle. This was fixed in facebook#7168 too but I'll just do an early fix to ensure that facebook#7168 is purely an npm change.
cccb686
to
91d79e0
Compare
91d79e0
to
531017a
Compare
'./ReactCurrentOwner': SECRET_INTERNALS_NAME + '.ReactCurrentOwner', | ||
'./ReactComponentTreeHook': SECRET_INTERNALS_NAME + '.ReactComponentTreeHook', | ||
// All these methods are shared are exposed. |
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.
rm
Alright, let's do it. Let's just fix the addons packaging bit and it's good to go. |
531017a
to
961cf87
Compare
@@ -141,7 +139,6 @@ var ReactTestRenderer = { | |||
|
|||
/* eslint-disable camelcase */ | |||
unstable_batchedUpdates: ReactUpdates.batchedUpdates, | |||
unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer, |
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.
This shouldn't be in the test renderer according to @spicyj because this currently uses the ReactDOM dependency.
961cf87
to
7e9cb5d
Compare
This copies modules into three separate packages instead of putting it all in React. The overlap in shared and between renderers gets duplicated. This allows the isomorphic package to stay minimal. It can also be used as a direct dependency without much risk. This also allow us to ship versions to each renderer independently and we can ship renderers without updating the main react package dependency.
7e9cb5d
to
d995587
Compare
This copies modules into three separate packages instead of putting it all in React. The overlap in shared and between renderers gets duplicated. This allows the isomorphic package to stay minimal. It can also be used as a direct dependency without much risk. This also allow us to ship versions to each renderer independently and we can ship renderers without updating the main react package dependency. (cherry picked from commit 0f004ef)
This copies modules into three separate packages instead of putting it all in React. The overlap in shared and between renderers gets duplicated. This allows the isomorphic package to stay minimal. It can also be used as a direct dependency without much risk. This also allow us to ship versions to each renderer independently and we can ship renderers without updating the main react package dependency.
Builds on top of #7164 with one commit 7c6a95c
This copies modules into three separate packages instead of putting it all in React.
The overlap in shared folders gets duplicated.
This allows the isomorphic package to stay minimal. It can also be used as a direct dependency without much risk.
This also allow us to ship versions to each renderer independently and we can ship renderers without updating the main react package dependency.