Skip to content

Commit 2e3f36a

Browse files
author
Julien Gilli
committed
provide profiling bundle for react-reconciler
1 parent 3367298 commit 2e3f36a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

scripts/rollup/bundles.js

Lines changed: 1 addition & 1 deletion
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',

scripts/rollup/wrappers.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,20 @@ module.exports = function $$$reconciler($$$hostConfig) {
292292
var exports = {};
293293
${source}
294294
return exports;
295+
};`;
296+
},
297+
298+
/***************** NODE_PROFILING (reconciler only) *****************/
299+
[NODE_PROFILING](source, globalName, filename, moduleType) {
300+
return `/** @license React v${reactVersion}
301+
* ${filename}
302+
*
303+
${license}
304+
*/
305+
module.exports = function $$$reconciler($$$hostConfig) {
306+
var exports = {};
307+
${source}
308+
return exports;
295309
};`;
296310
},
297311
};

0 commit comments

Comments
 (0)