provide profiling bundle for react-reconciler (#19559)

This commit is contained in:
Julien Gilli
2020-08-19 06:11:27 -07:00
committed by GitHub
parent 32ca313060
commit b8fa09e9e2
2 changed files with 15 additions and 1 deletions

View File

@@ -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',

View File

@@ -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;
};`;
},
};