Remove dependency to event system on the server#10173
Remove dependency to event system on the server#10173gaearon merged 1 commit intofacebook:masterfrom
Conversation
I do this by splitting ReactDOMInjection into generic and client-only injection.
| "react-dom-server.production.min.js (NODE_PROD)": { | ||
| "size": 61847, | ||
| "gzip": 20971 | ||
| "size": 23614, |
There was a problem hiding this comment.
Oof. jeez that's a difference.
flarnie
left a comment
There was a problem hiding this comment.
I think this makes sense - it looks like you moved things out of `ReactDOMinjection' and into a client-side only file.
| if (alreadyInjected) { | ||
| // TODO: This is currently true because these injections are shared between | ||
| // the client and the server package. They should be built independently | ||
| // and not share any injection state. Then this problem will be solved. |
There was a problem hiding this comment.
Could we remove this 'TODO'? Or is that talking about a follow-up step that changes the build process?
There was a problem hiding this comment.
We can, but we should probably remove it from all such files (there's a few). It's not relevant since flat bundles.
There was a problem hiding this comment.
I think I'll send a separate PR for that.
|
Honestly, I'd rather do the opposite and fork everything that's shared. |
|
In fact, I'm going to do that anyway because the markup generation part of those helpers are not used on the client. |
|
Yep. I was going to separate it but if you already started lmk. |
Fixes #10172.