Skip to content

Commit

Permalink
Build FB specific Isomorphic Bundles (facebook#19049)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sebmarkbage authored May 29, 2020
1 parent 2efe63d commit 1d85bb3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ jobs:
paths:
- RELEASE_CHANNEL
- facebook-www
- facebook-react-native
- node_modules
- react-native
- dist
Expand All @@ -295,6 +296,7 @@ jobs:
paths:
- RELEASE_CHANNEL
- facebook-www
- facebook-react-native
- node_modules
- react-native
- dist
Expand Down
26 changes: 25 additions & 1 deletion scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ const bundles = [
FB_WWW_DEV,
FB_WWW_PROD,
FB_WWW_PROFILING,
RN_FB_DEV,
RN_FB_PROD,
RN_FB_PROFILING,
],
moduleType: ISOMORPHIC,
entry: 'react',
Expand All @@ -92,6 +95,9 @@ const bundles = [
NODE_PROD,
NODE_PROFILING,
// TODO: use on WWW.
RN_FB_DEV,
RN_FB_PROD,
RN_FB_PROFILING,
],
moduleType: ISOMORPHIC,
entry: 'react/jsx-runtime',
Expand All @@ -108,6 +114,9 @@ const bundles = [
FB_WWW_DEV,
FB_WWW_PROD,
FB_WWW_PROFILING,
RN_FB_DEV,
RN_FB_PROD,
RN_FB_PROFILING,
],
moduleType: ISOMORPHIC,
entry: 'react/jsx-dev-runtime',
Expand Down Expand Up @@ -400,7 +409,14 @@ const bundles = [

/******* React Test Renderer *******/
{
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD],
bundleTypes: [
FB_WWW_DEV,
NODE_DEV,
NODE_PROD,
UMD_DEV,
UMD_PROD,
RN_FB_DEV,
],
moduleType: RENDERER,
entry: 'react-test-renderer',
global: 'ReactTestRenderer',
Expand Down Expand Up @@ -601,6 +617,9 @@ const bundles = [
FB_WWW_DEV,
FB_WWW_PROD,
FB_WWW_PROFILING,
RN_FB_DEV,
RN_FB_PROD,
RN_FB_PROFILING,
],
moduleType: ISOMORPHIC,
entry: 'scheduler',
Expand All @@ -617,6 +636,8 @@ const bundles = [
NODE_PROD,
FB_WWW_DEV,
FB_WWW_PROD,
RN_FB_DEV,
RN_FB_PROD,
],
moduleType: ISOMORPHIC,
entry: 'scheduler/unstable_mock',
Expand Down Expand Up @@ -670,6 +691,9 @@ const bundles = [
NODE_DEV,
NODE_PROD,
NODE_PROFILING,
RN_FB_DEV,
RN_FB_PROD,
RN_FB_PROFILING,
],
moduleType: ISOMORPHIC,
entry: 'scheduler/tracing',
Expand Down
4 changes: 4 additions & 0 deletions scripts/rollup/packaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ function getBundleOutputPath(bundleType, filename, packageName) {
case RN_FB_PROD:
case RN_FB_PROFILING:
switch (packageName) {
case 'scheduler':
case 'react':
case 'react-test-renderer':
return `build/facebook-react-native/${packageName}/cjs/${filename}`;
case 'react-native-renderer':
return `build/react-native/implementations/${filename.replace(
/\.js$/,
Expand Down

0 comments on commit 1d85bb3

Please sign in to comment.