provide profiling bundle for react-reconciler (#19559)
Julien Gilli committed
Aug 19, 2020 at 06:11 UTC
b8fa09e9e2b52d46e47ad604ef7c8c3529471b71
2 files changed
+15
-1
scripts/rollup/bundles.js
+1
-1
@@ -488,7 +488,7 @@ const bundles = [
488
489
/******* React Reconciler *******/
490
{
491
- bundleTypes: [NODE_DEV, NODE_PROD],
491
+ bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING],
492
moduleType: RECONCILER,
493
entry: 'react-reconciler',
494
global: 'ReactReconciler',
scripts/rollup/wrappers.js
+14
@@ -289,6 +289,20 @@ module.exports = function $$$reconciler($$$hostConfig) {
289
var exports = {};
290
${source}
291
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;
306
};`;
307
},
308
};