Skip to content

Commit 1d7cf8d

Browse files
committed
Build react-reconciler for FB builds
1 parent da6ba53 commit 1d7cf8d

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

scripts/rollup/bundles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ const bundles = [
817817

818818
/******* React Reconciler *******/
819819
{
820-
bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING],
820+
bundleTypes: [NODE_DEV, NODE_PROD, NODE_PROFILING, FB_WWW_DEV, FB_WWW_PROD],
821821
moduleType: RECONCILER,
822822
entry: 'react-reconciler',
823823
global: 'ReactReconciler',

scripts/rollup/wrappers.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,47 @@ module.exports.default = module.exports;
204204
Object.defineProperty(module.exports, "__esModule", { value: true });
205205
`;
206206
},
207+
208+
/***************** FB_WWW_DEV (reconciler only) *****************/
209+
[FB_WWW_DEV](source, globalName, filename, moduleType) {
210+
return `'use strict';
211+
212+
if (__DEV__) {
213+
module.exports = function $$$reconciler($$$config) {
214+
var exports = {};
215+
${source}
216+
return exports;
217+
};
218+
module.exports.default = module.exports;
219+
Object.defineProperty(module.exports, "__esModule", { value: true });
220+
}
221+
`;
222+
},
223+
224+
/***************** FB_WWW_PROD (reconciler only) *****************/
225+
[FB_WWW_PROD](source, globalName, filename, moduleType) {
226+
return `module.exports = function $$$reconciler($$$config) {
227+
228+
var exports = {};
229+
${source}
230+
return exports;
231+
};
232+
module.exports.default = module.exports;
233+
Object.defineProperty(module.exports, "__esModule", { value: true });
234+
`;
235+
},
236+
237+
/***************** FB_WWW_PROFILING (reconciler only) *****************/
238+
[FB_WWW_PROFILING](source, globalName, filename, moduleType) {
239+
return `module.exports = function $$$reconciler($$$config) {
240+
var exports = {};
241+
${source}
242+
return exports;
243+
};
244+
module.exports.default = module.exports;
245+
Object.defineProperty(module.exports, "__esModule", { value: true });
246+
`;
247+
},
207248
};
208249

209250
const licenseHeaderWrappers = {

0 commit comments

Comments
 (0)