Skip to content

Commit

Permalink
Build react-reconciler for FB builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Apr 19, 2024
1 parent da6ba53 commit 1d7cf8d
Show file tree
Hide file tree
Showing 2 changed files with 42 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 @@ -817,7 +817,7 @@ const bundles = [

/******* React Reconciler *******/
{
bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING],
bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING, FB_WWW_DEV, FB_WWW_PROD],
moduleType: RECONCILER,
entry: 'react-reconciler',
global: 'ReactReconciler',
Expand Down
41 changes: 41 additions & 0 deletions scripts/rollup/wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,47 @@ module.exports.default = module.exports;
Object.defineProperty(module.exports, "__esModule", { value: true });
`;
},

/***************** FB_WWW_DEV (reconciler only) *****************/
[FB_WWW_DEV](source, globalName, filename, moduleType) {
return `'use strict';
if (__DEV__) {
module.exports = function $$$reconciler($$$config) {
var exports = {};
${source}
return exports;
};
module.exports.default = module.exports;
Object.defineProperty(module.exports, "__esModule", { value: true });
}
`;
},

/***************** FB_WWW_PROD (reconciler only) *****************/
[FB_WWW_PROD](source, globalName, filename, moduleType) {
return `module.exports = function $$$reconciler($$$config) {
var exports = {};
${source}
return exports;
};
module.exports.default = module.exports;
Object.defineProperty(module.exports, "__esModule", { value: true });
`;
},

/***************** FB_WWW_PROFILING (reconciler only) *****************/
[FB_WWW_PROFILING](source, globalName, filename, moduleType) {
return `module.exports = function $$$reconciler($$$config) {
var exports = {};
${source}
return exports;
};
module.exports.default = module.exports;
Object.defineProperty(module.exports, "__esModule", { value: true });
`;
},
};

const licenseHeaderWrappers = {
Expand Down

0 comments on commit 1d7cf8d

Please sign in to comment.