From b8fa09e9e2b52d46e47ad604ef7c8c3529471b71 Mon Sep 17 00:00:00 2001 From: Julien Gilli Date: Wed, 19 Aug 2020 06:11:27 -0700 Subject: [PATCH] provide profiling bundle for react-reconciler (#19559) --- scripts/rollup/bundles.js | 2 +- scripts/rollup/wrappers.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index 328fb4c626cb7..baf93fd578155 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -488,7 +488,7 @@ const bundles = [ /******* React Reconciler *******/ { - bundleTypes: [NODE_DEV, NODE_PROD], + bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING], moduleType: RECONCILER, entry: 'react-reconciler', global: 'ReactReconciler', diff --git a/scripts/rollup/wrappers.js b/scripts/rollup/wrappers.js index 18fedccf4914a..ed62f37211d06 100644 --- a/scripts/rollup/wrappers.js +++ b/scripts/rollup/wrappers.js @@ -289,6 +289,20 @@ module.exports = function $$$reconciler($$$hostConfig) { var exports = {}; ${source} return exports; +};`; + }, + + /***************** NODE_PROFILING (reconciler only) *****************/ + [NODE_PROFILING](source, globalName, filename, moduleType) { + return `/** @license React v${reactVersion} + * ${filename} + * +${license} + */ +module.exports = function $$$reconciler($$$hostConfig) { + var exports = {}; +${source} + return exports; };`; }, };