From 8d540387736ac8a3d2d1e932b187cf7fe2c9607e Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 8 Aug 2019 18:52:08 -0700 Subject: [PATCH] Add use-subscription to Rollup bundle config (#16326) --- scripts/rollup/bundles.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index fc06b507c7c3..d1e60de6507c 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -393,7 +393,7 @@ const bundles = [ externals: ['react', 'scheduler'], }, - /******* createComponentWithSubscriptions (experimental) *******/ + /******* createComponentWithSubscriptions *******/ { bundleTypes: [NODE_DEV, NODE_PROD], moduleType: ISOMORPHIC, @@ -409,6 +409,15 @@ const bundles = [ }), }, + /******* Hook for managing subscriptions safely *******/ + { + bundleTypes: [NODE_DEV, NODE_PROD], + moduleType: ISOMORPHIC, + entry: 'use-subscription', + global: 'useSubscription', + externals: ['react'], + }, + /******* React Scheduler (experimental) *******/ { bundleTypes: [NODE_DEV, NODE_PROD, FB_WWW_DEV, FB_WWW_PROD],