Skip to content

Commit

Permalink
provide profiling bundle for react-reconciler (facebook#19559)
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdjules authored and koto committed Jun 15, 2021
1 parent 92226ac commit 14f44ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 14 additions & 0 deletions scripts/rollup/wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};`;
},
};
Expand Down

0 comments on commit 14f44ee

Please sign in to comment.