-
Notifications
You must be signed in to change notification settings - Fork 48.7k
[Fizz] Always load the external runtime if one is provided #33091
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
Conversation
Comparing: 0ed6ceb...db624e8 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
bf4170e
to
742f8bc
Compare
742f8bc
to
fe7e9b2
Compare
(gate(flags => flags.shouldUseFizzExternalRuntime) | ||
? '<script src="react-dom-bindings/src/server/ReactDOMServerExternalRuntime.js" async=""></script>' | ||
: '') + |
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.
script src should be react-dom/unstable_server-external-runtime
fe7e9b2
to
8a4c659
Compare
8a4c659
to
0f2e1e4
Compare
0f2e1e4
to
db624e8
Compare
One thing we could do is maybe make it conditional if there are no eligible Suspense boundaries rendered. Which if if you set |
Because we now decided whether to outline in the flushing phase, when we're writing the preamble we don't yet know if we will make that decision so we don't know if it's safe to omit the external runtime. However, if you are providing an external runtime it's probably a pretty safe bet you're streaming something dynamically that's likely to need it so we can always include it. The main thing is that this makes it hard to test it because it affects our tests in ways it wouldn't otherwise so we have to add a bunch of conditions. DiffTrain build for [f739642](f739642)
…33091) Because we now decided whether to outline in the flushing phase, when we're writing the preamble we don't yet know if we will make that decision so we don't know if it's safe to omit the external runtime. However, if you are providing an external runtime it's probably a pretty safe bet you're streaming something dynamically that's likely to need it so we can always include it. The main thing is that this makes it hard to test it because it affects our tests in ways it wouldn't otherwise so we have to add a bunch of conditions. DiffTrain build for [f739642](facebook@f739642)
…33091) Because we now decided whether to outline in the flushing phase, when we're writing the preamble we don't yet know if we will make that decision so we don't know if it's safe to omit the external runtime. However, if you are providing an external runtime it's probably a pretty safe bet you're streaming something dynamically that's likely to need it so we can always include it. The main thing is that this makes it hard to test it because it affects our tests in ways it wouldn't otherwise so we have to add a bunch of conditions. DiffTrain build for [f739642](facebook@f739642)
Because we now decided whether to outline in the flushing phase, when we're writing the preamble we don't yet know if we will make that decision so we don't know if it's safe to omit the external runtime.
However, if you are providing an external runtime it's probably a pretty safe bet you're streaming something dynamically that's likely to need it so we can always include it.
The main thing is that this makes it hard to test it because it affects our tests in ways it wouldn't otherwise so we have to add a bunch of conditions.