Skip to content

Commit

Permalink
provide profiling bundle for react-reconciler
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Gilli committed Aug 7, 2020
1 parent 3367298 commit 2e3f36a
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 @@ -292,6 +292,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 2e3f36a

Please sign in to comment.