From 1d85bb3ce13401644a5e345f8bc84522c59a951c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Fri, 29 May 2020 15:32:38 -0700 Subject: [PATCH] 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. --- .circleci/config.yml | 2 ++ scripts/rollup/bundles.js | 26 +++++++++++++++++++++++++- scripts/rollup/packaging.js | 4 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5083e34651..f318991d22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,6 +269,7 @@ jobs: paths: - RELEASE_CHANNEL - facebook-www + - facebook-react-native - node_modules - react-native - dist @@ -295,6 +296,7 @@ jobs: paths: - RELEASE_CHANNEL - facebook-www + - facebook-react-native - node_modules - react-native - dist diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index e20713b916..1c319ce45f 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -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', @@ -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', @@ -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', @@ -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', @@ -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', @@ -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', @@ -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', diff --git a/scripts/rollup/packaging.js b/scripts/rollup/packaging.js index 0537c65bbd..e2a4f51b74 100644 --- a/scripts/rollup/packaging.js +++ b/scripts/rollup/packaging.js @@ -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$/,