diff --git a/.github/workflows/runtime_commit_artifacts.yml b/.github/workflows/runtime_commit_artifacts.yml index f47eb3ff360e9..ed0c59caf883e 100644 --- a/.github/workflows/runtime_commit_artifacts.yml +++ b/.github/workflows/runtime_commit_artifacts.yml @@ -125,6 +125,7 @@ jobs: mv build/react-native/shims/ $BASE_FOLDER/react-native-github/Libraries/Renderer/ mv build/facebook-react-native/scheduler/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/scheduler/ mv build/facebook-react-native/react/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react/ + mv build/facebook-react-native/react/dom/ $BASE_FOLDER/RKJSModules/vendor/react/react-dom/ mv build/facebook-react-native/react-is/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react-is/ mv build/facebook-react-native/react-test-renderer/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react-test-renderer/ diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index 081b91b9d0b80..26a88fb00811d 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -183,6 +183,7 @@ const bundles = [ wrapWithModuleBoundaries: true, externals: ['react'], }, + /******* React DOM Client *******/ { bundleTypes: [NODE_DEV, NODE_PROD], @@ -204,7 +205,8 @@ const bundles = [ wrapWithModuleBoundaries: true, externals: ['react', 'react-dom'], }, - /******* React DOM FB *******/ + + /******* React DOM (www) *******/ { bundleTypes: [FB_WWW_DEV, FB_WWW_PROD, FB_WWW_PROFILING], moduleType: RENDERER, @@ -215,6 +217,50 @@ const bundles = [ externals: ['react'], }, + /******* React DOM (fbsource) *******/ + { + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING], + moduleType: RENDERER, + entry: 'react-dom', + global: 'ReactDOM', + minifyWithProdErrorCodes: true, + wrapWithModuleBoundaries: false, + externals: ['react', 'ReactNativeInternalFeatureFlags'], + }, + + /******* React DOM Client (fbsource) *******/ + { + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING], + moduleType: RENDERER, + entry: 'react-dom/client', + global: 'ReactDOMClient', + minifyWithProdErrorCodes: true, + wrapWithModuleBoundaries: false, + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'], + }, + + /******* React DOM Profiling (fbsource) *******/ + { + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING], + moduleType: RENDERER, + entry: 'react-dom/profiling', + global: 'ReactDOMProfiling', + minifyWithProdErrorCodes: true, + wrapWithModuleBoundaries: true, + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'], + }, + + /******* React DOM Test Utils (fbsource) *******/ + { + moduleType: RENDERER_UTILS, + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING], + entry: 'react-dom/test-utils', + global: 'ReactDOMTestUtils', + minifyWithProdErrorCodes: false, + wrapWithModuleBoundaries: false, + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'], + }, + /******* React DOM React Server *******/ { bundleTypes: [NODE_DEV, NODE_PROD], diff --git a/scripts/rollup/packaging.js b/scripts/rollup/packaging.js index 7c433fc2dd330..bc83cb8789eb8 100644 --- a/scripts/rollup/packaging.js +++ b/scripts/rollup/packaging.js @@ -76,6 +76,7 @@ function getBundleOutputPath(bundle, bundleType, filename, packageName) { switch (packageName) { case 'scheduler': case 'react': + case 'react-dom': case 'react-is': case 'react-test-renderer': return `build/facebook-react-native/${packageName}/cjs/${filename}`;