Skip to content

Commit b8fa09e

Browse files
authored
provide profiling bundle for react-reconciler (#19559)
1 parent 32ca313 commit b8fa09e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Diff for: scripts/rollup/bundles.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ const bundles = [
488488

489489
/******* React Reconciler *******/
490490
{
491-
bundleTypes: [NODE_DEV, NODE_PROD],
491+
bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING],
492492
moduleType: RECONCILER,
493493
entry: 'react-reconciler',
494494
global: 'ReactReconciler',

Diff for: scripts/rollup/wrappers.js

+14
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,20 @@ module.exports = function $$$reconciler($$$hostConfig) {
289289
var exports = {};
290290
${source}
291291
return exports;
292+
};`;
293+
},
294+
295+
/***************** NODE_PROFILING (reconciler only) *****************/
296+
[NODE_PROFILING](source, globalName, filename, moduleType) {
297+
return `/** @license React v${reactVersion}
298+
* ${filename}
299+
*
300+
${license}
301+
*/
302+
module.exports = function $$$reconciler($$$hostConfig) {
303+
var exports = {};
304+
${source}
305+
return exports;
292306
};`;
293307
},
294308
};

0 commit comments

Comments
 (0)