Skip to content

Commit 1d85bb3

Browse files
authored
Build FB specific Isomorphic Bundles (#19049)
We need this so we can version them separately and use different feature flags than we use for OSS RN. I put them in a separate facebook-react-native folder which won't go into the RN GH repo. I plan on moving the renderers there too but not yet.
1 parent 2efe63d commit 1d85bb3

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ jobs:
269269
paths:
270270
- RELEASE_CHANNEL
271271
- facebook-www
272+
- facebook-react-native
272273
- node_modules
273274
- react-native
274275
- dist
@@ -295,6 +296,7 @@ jobs:
295296
paths:
296297
- RELEASE_CHANNEL
297298
- facebook-www
299+
- facebook-react-native
298300
- node_modules
299301
- react-native
300302
- dist

scripts/rollup/bundles.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ const bundles = [
7878
FB_WWW_DEV,
7979
FB_WWW_PROD,
8080
FB_WWW_PROFILING,
81+
RN_FB_DEV,
82+
RN_FB_PROD,
83+
RN_FB_PROFILING,
8184
],
8285
moduleType: ISOMORPHIC,
8386
entry: 'react',
@@ -92,6 +95,9 @@ const bundles = [
9295
NODE_PROD,
9396
NODE_PROFILING,
9497
// TODO: use on WWW.
98+
RN_FB_DEV,
99+
RN_FB_PROD,
100+
RN_FB_PROFILING,
95101
],
96102
moduleType: ISOMORPHIC,
97103
entry: 'react/jsx-runtime',
@@ -108,6 +114,9 @@ const bundles = [
108114
FB_WWW_DEV,
109115
FB_WWW_PROD,
110116
FB_WWW_PROFILING,
117+
RN_FB_DEV,
118+
RN_FB_PROD,
119+
RN_FB_PROFILING,
111120
],
112121
moduleType: ISOMORPHIC,
113122
entry: 'react/jsx-dev-runtime',
@@ -400,7 +409,14 @@ const bundles = [
400409

401410
/******* React Test Renderer *******/
402411
{
403-
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD],
412+
bundleTypes: [
413+
FB_WWW_DEV,
414+
NODE_DEV,
415+
NODE_PROD,
416+
UMD_DEV,
417+
UMD_PROD,
418+
RN_FB_DEV,
419+
],
404420
moduleType: RENDERER,
405421
entry: 'react-test-renderer',
406422
global: 'ReactTestRenderer',
@@ -601,6 +617,9 @@ const bundles = [
601617
FB_WWW_DEV,
602618
FB_WWW_PROD,
603619
FB_WWW_PROFILING,
620+
RN_FB_DEV,
621+
RN_FB_PROD,
622+
RN_FB_PROFILING,
604623
],
605624
moduleType: ISOMORPHIC,
606625
entry: 'scheduler',
@@ -617,6 +636,8 @@ const bundles = [
617636
NODE_PROD,
618637
FB_WWW_DEV,
619638
FB_WWW_PROD,
639+
RN_FB_DEV,
640+
RN_FB_PROD,
620641
],
621642
moduleType: ISOMORPHIC,
622643
entry: 'scheduler/unstable_mock',
@@ -670,6 +691,9 @@ const bundles = [
670691
NODE_DEV,
671692
NODE_PROD,
672693
NODE_PROFILING,
694+
RN_FB_DEV,
695+
RN_FB_PROD,
696+
RN_FB_PROFILING,
673697
],
674698
moduleType: ISOMORPHIC,
675699
entry: 'scheduler/tracing',

scripts/rollup/packaging.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ function getBundleOutputPath(bundleType, filename, packageName) {
7070
case RN_FB_PROD:
7171
case RN_FB_PROFILING:
7272
switch (packageName) {
73+
case 'scheduler':
74+
case 'react':
75+
case 'react-test-renderer':
76+
return `build/facebook-react-native/${packageName}/cjs/${filename}`;
7377
case 'react-native-renderer':
7478
return `build/react-native/implementations/${filename.replace(
7579
/\.js$/,

0 commit comments

Comments
 (0)