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

[Fizz] Stop publishing external-runtime to stable channel #28796

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const enableUseEffectEventHook = __EXPERIMENTAL__;
// Test in www before enabling in open source.
// Enables DOM-server to stream its instruction set as data-attributes
// (handled with an MutationObserver) instead of inline-scripts
export const enableFizzExternalRuntime = true;
export const enableFizzExternalRuntime = __EXPERIMENTAL__;

export const alwaysThrottleRetries = true;

Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ const bundles = [

/******* React DOM Fizz Server External Runtime *******/
{
bundleTypes: [BROWSER_SCRIPT],
bundleTypes: __EXPERIMENTAL__ ? [BROWSER_SCRIPT] : [],
moduleType: RENDERER,
entry: 'react-dom/unstable_server-external-runtime',
outputPath: 'unstable_server-external-runtime.js',
Expand Down
9 changes: 8 additions & 1 deletion scripts/rollup/packaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,14 @@ function filterOutEntrypoints(name) {
// Let's remove it.
files.splice(i, 1);
i--;
unlinkSync(`build/node_modules/${name}/${filename}`);
try {
unlinkSync(`build/node_modules/${name}/${filename}`);
} catch (err) {
// If the file doesn't exist we can just move on. Otherwise throw the halt the build
if (err.code !== 'ENOENT') {
throw err;
}
}
Comment on lines +238 to +245
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is needed so packaging doesn't crash if the file to be deleted does not exist (which it won't in the stable channel because we don't bother building the external runtime script

changed = true;
// Remove it from the exports field too if it exists.
if (exportsJSON) {
Expand Down