Skip to content

Commit

Permalink
Bundle config: Rename global to hasteFileName in bundle config
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kassens committed May 2, 2024
1 parent 63faec5 commit 986f266
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 152 deletions.
14 changes: 1 addition & 13 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,7 @@ let getRollupInteropValue = id => {
return 'esModule';
};

function getRollupOutputOptions(
outputPath,
format,
globals,
globalName,
bundleType
) {
function getRollupOutputOptions(outputPath, format, globals, bundleType) {
const isProduction = isProductionBundleType(bundleType);

return {
Expand All @@ -214,7 +208,6 @@ function getRollupOutputOptions(
globals,
freeze: !isProduction,
interop: getRollupInteropValue,
name: globalName,
sourcemap: false,
esModule: false,
exports: 'auto',
Expand Down Expand Up @@ -351,7 +344,6 @@ function getPlugins(
filename,
packageName,
bundleType,
globalName,
moduleType,
pureExternalModules,
bundle
Expand Down Expand Up @@ -424,7 +416,6 @@ function getPlugins(
return Wrappers.wrapWithTopLevelDefinitions(
source,
bundleType,
globalName,
filename,
moduleType,
bundle.wrapWithModuleBoundaries
Expand Down Expand Up @@ -488,7 +479,6 @@ function getPlugins(
return Wrappers.wrapWithLicenseHeader(
source,
bundleType,
globalName,
filename,
moduleType
);
Expand Down Expand Up @@ -651,7 +641,6 @@ async function createBundle(bundle, bundleType) {
filename,
packageName,
bundleType,
bundle.global,
bundle.moduleType,
pureExternalModules,
bundle
Expand All @@ -674,7 +663,6 @@ async function createBundle(bundle, bundleType) {
mainOutputPath,
format,
peerGlobals,
bundle.global,
bundleType
);

Expand Down
Loading

0 comments on commit 986f266

Please sign in to comment.