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.
Sebastian Markbåge committed
May 29, 2020 at 15:32 UTC
1d85bb3ce13401644a5e345f8bc84522c59a951c
3 files changed
+31
-1
.circleci/config.yml
+2
@@ -269,6 +269,7 @@ jobs:
269
paths:
270
- RELEASE_CHANNEL
271
- facebook-www
272
+ - facebook-react-native
273
- node_modules
274
- react-native
275
- dist
@@ -295,6 +296,7 @@ jobs:
296
paths:
297
- RELEASE_CHANNEL
298
- facebook-www
299
+ - facebook-react-native
300
- node_modules
301
- react-native
302
- dist
scripts/rollup/bundles.js
+25
-1
@@ -78,6 +78,9 @@ const bundles = [
78
FB_WWW_DEV,
79
FB_WWW_PROD,
80
FB_WWW_PROFILING,
81
+ RN_FB_DEV,
82
+ RN_FB_PROD,
83
+ RN_FB_PROFILING,
84
],
85
moduleType: ISOMORPHIC,
86
entry: 'react',
@@ -92,6 +95,9 @@ const bundles = [
95
NODE_PROD,
96
NODE_PROFILING,
97
// TODO: use on WWW.
98
+ RN_FB_DEV,
99
+ RN_FB_PROD,
100
+ RN_FB_PROFILING,
101
],
102
moduleType: ISOMORPHIC,
103
entry: 'react/jsx-runtime',
@@ -108,6 +114,9 @@ const bundles = [
114
FB_WWW_DEV,
115
FB_WWW_PROD,
116
FB_WWW_PROFILING,
117
+ RN_FB_DEV,
118
+ RN_FB_PROD,
119
+ RN_FB_PROFILING,
120
],
121
moduleType: ISOMORPHIC,
122
entry: 'react/jsx-dev-runtime',
@@ -400,7 +409,14 @@ const bundles = [
409
410
/******* React Test Renderer *******/
411
{
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
+ ],
420
moduleType: RENDERER,
421
entry: 'react-test-renderer',
422
global: 'ReactTestRenderer',
@@ -601,6 +617,9 @@ const bundles = [
617
FB_WWW_DEV,
618
FB_WWW_PROD,
619
FB_WWW_PROFILING,
620
+ RN_FB_DEV,
621
+ RN_FB_PROD,
622
+ RN_FB_PROFILING,
623
],
624
moduleType: ISOMORPHIC,
625
entry: 'scheduler',
@@ -617,6 +636,8 @@ const bundles = [
636
NODE_PROD,
637
FB_WWW_DEV,
638
FB_WWW_PROD,
639
+ RN_FB_DEV,
640
+ RN_FB_PROD,
641
],
642
moduleType: ISOMORPHIC,
643
entry: 'scheduler/unstable_mock',
@@ -670,6 +691,9 @@ const bundles = [
691
NODE_DEV,
692
NODE_PROD,
693
NODE_PROFILING,
694
+ RN_FB_DEV,
695
+ RN_FB_PROD,
696
+ RN_FB_PROFILING,
697
],
698
moduleType: ISOMORPHIC,
699
entry: 'scheduler/tracing',
scripts/rollup/packaging.js
+4
@@ -70,6 +70,10 @@ function getBundleOutputPath(bundleType, filename, packageName) {
70
case RN_FB_PROD:
71
case RN_FB_PROFILING:
72
switch (packageName) {
73
+ case 'scheduler':
74
+ case 'react':
75
+ case 'react-test-renderer':
76
+ return `build/facebook-react-native/${packageName}/cjs/${filename}`;
77
case 'react-native-renderer':
78
return `build/react-native/implementations/${filename.replace(
79
/\.js$/,