Skip to content

Commit 25e6d44

Browse files
committed
Bundle config: Rename global to hasteFileName in bundle config
The whole bundle config is pretty confusing to me, I took a look and here's a few things that could be simplified. This config is now only used for determining the file name for "haste" style bundles for FB and RN builds. In the past it was also used for UMD builds that we no longer build. Also removes a bunch of parameters to wrappers that were completely unused.
1 parent 0a0a3af commit 25e6d44

File tree

3 files changed

+72
-152
lines changed

3 files changed

+72
-152
lines changed

scripts/rollup/build.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,7 @@ let getRollupInteropValue = id => {
199199
return 'esModule';
200200
};
201201

202-
function getRollupOutputOptions(
203-
outputPath,
204-
format,
205-
globals,
206-
globalName,
207-
bundleType
208-
) {
202+
function getRollupOutputOptions(outputPath, format, globals, bundleType) {
209203
const isProduction = isProductionBundleType(bundleType);
210204

211205
return {
@@ -214,7 +208,6 @@ function getRollupOutputOptions(
214208
globals,
215209
freeze: !isProduction,
216210
interop: getRollupInteropValue,
217-
name: globalName,
218211
sourcemap: false,
219212
esModule: false,
220213
exports: 'auto',
@@ -351,7 +344,6 @@ function getPlugins(
351344
filename,
352345
packageName,
353346
bundleType,
354-
globalName,
355347
moduleType,
356348
pureExternalModules,
357349
bundle
@@ -424,7 +416,6 @@ function getPlugins(
424416
return Wrappers.wrapWithTopLevelDefinitions(
425417
source,
426418
bundleType,
427-
globalName,
428419
filename,
429420
moduleType,
430421
bundle.wrapWithModuleBoundaries
@@ -488,7 +479,6 @@ function getPlugins(
488479
return Wrappers.wrapWithLicenseHeader(
489480
source,
490481
bundleType,
491-
globalName,
492482
filename,
493483
moduleType
494484
);
@@ -651,7 +641,6 @@ async function createBundle(bundle, bundleType) {
651641
filename,
652642
packageName,
653643
bundleType,
654-
bundle.global,
655644
bundle.moduleType,
656645
pureExternalModules,
657646
bundle
@@ -674,7 +663,6 @@ async function createBundle(bundle, bundleType) {
674663
mainOutputPath,
675664
format,
676665
peerGlobals,
677-
bundle.global,
678666
bundleType
679667
);
680668

0 commit comments

Comments
 (0)