@samitouri / QOS-React-1 / commits / e72127a4ec

Build `react-dom` in `builds/facebook-fbsource` (#30711)

## Summary Builds `react-dom` for React Native so that it also populates the `builds/facebook-fbsource` branch. **NOTE:** For Meta employees, D61354219 is the internal integration. ## How did you test this change? ``` $ yarn build … $ ls build/facebook-react-native/react-dom/cjs ReactDOM-dev.js ReactDOM-prod.js ReactDOM-profiling.js ```

Timothy Yung committed Sep 18, 2024 at 14:44 UTC e72127a4ec6f91288e9008711215068823100599
3 files changed +49 -1
.github/workflows/runtime_commit_artifacts.yml
+1
@@ -125,6 +125,7 @@ jobs:
125 mv build/react-native/shims/ $BASE_FOLDER/react-native-github/Libraries/Renderer/
126 mv build/facebook-react-native/scheduler/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/scheduler/
127 mv build/facebook-react-native/react/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react/
128 + mv build/facebook-react-native/react/dom/ $BASE_FOLDER/RKJSModules/vendor/react/react-dom/
129 mv build/facebook-react-native/react-is/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react-is/
130 mv build/facebook-react-native/react-test-renderer/cjs/ $BASE_FOLDER/RKJSModules/vendor/react/react-test-renderer/
131
scripts/rollup/bundles.js
+47 -1
@@ -183,6 +183,7 @@ const bundles = [
183 wrapWithModuleBoundaries: true,
184 externals: ['react'],
185 },
186 +
187 /******* React DOM Client *******/
188 {
189 bundleTypes: [NODE_DEV, NODE_PROD],
@@ -204,7 +205,8 @@ const bundles = [
205 wrapWithModuleBoundaries: true,
206 externals: ['react', 'react-dom'],
207 },
207 - /******* React DOM FB *******/
208 +
209 + /******* React DOM (www) *******/
210 {
211 bundleTypes: [FB_WWW_DEV, FB_WWW_PROD, FB_WWW_PROFILING],
212 moduleType: RENDERER,
@@ -215,6 +217,50 @@ const bundles = [
217 externals: ['react'],
218 },
219
220 + /******* React DOM (fbsource) *******/
221 + {
222 + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING],
223 + moduleType: RENDERER,
224 + entry: 'react-dom',
225 + global: 'ReactDOM',
226 + minifyWithProdErrorCodes: true,
227 + wrapWithModuleBoundaries: false,
228 + externals: ['react', 'ReactNativeInternalFeatureFlags'],
229 + },
230 +
231 + /******* React DOM Client (fbsource) *******/
232 + {
233 + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING],
234 + moduleType: RENDERER,
235 + entry: 'react-dom/client',
236 + global: 'ReactDOMClient',
237 + minifyWithProdErrorCodes: true,
238 + wrapWithModuleBoundaries: false,
239 + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'],
240 + },
241 +
242 + /******* React DOM Profiling (fbsource) *******/
243 + {
244 + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING],
245 + moduleType: RENDERER,
246 + entry: 'react-dom/profiling',
247 + global: 'ReactDOMProfiling',
248 + minifyWithProdErrorCodes: true,
249 + wrapWithModuleBoundaries: true,
250 + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'],
251 + },
252 +
253 + /******* React DOM Test Utils (fbsource) *******/
254 + {
255 + moduleType: RENDERER_UTILS,
256 + bundleTypes: [RN_FB_DEV, RN_FB_PROD, RN_FB_PROFILING],
257 + entry: 'react-dom/test-utils',
258 + global: 'ReactDOMTestUtils',
259 + minifyWithProdErrorCodes: false,
260 + wrapWithModuleBoundaries: false,
261 + externals: ['react', 'react-dom', 'ReactNativeInternalFeatureFlags'],
262 + },
263 +
264 /******* React DOM React Server *******/
265 {
266 bundleTypes: [NODE_DEV, NODE_PROD],
scripts/rollup/packaging.js
+1
@@ -76,6 +76,7 @@ function getBundleOutputPath(bundle, bundleType, filename, packageName) {
76 switch (packageName) {
77 case 'scheduler':
78 case 'react':
79 + case 'react-dom':
80 case 'react-is':
81 case 'react-test-renderer':
82 return `build/facebook-react-native/${packageName}/cjs/${filename}`;