@@ -346,7 +346,7 @@ function getPlugins(
346
346
bundleType === UMD_DEV ||
347
347
bundleType === UMD_PROD ||
348
348
bundleType === UMD_PROFILING ;
349
- const isFBBundle =
349
+ const isFBWWWBundle =
350
350
bundleType === FB_WWW_DEV ||
351
351
bundleType === FB_WWW_PROD ||
352
352
bundleType === FB_WWW_PROFILING ;
@@ -357,7 +357,7 @@ function getPlugins(
357
357
bundleType === RN_FB_DEV ||
358
358
bundleType === RN_FB_PROD ||
359
359
bundleType === RN_FB_PROFILING ;
360
- const shouldStayReadable = isFBBundle || isRNBundle || forcePrettyOutput ;
360
+ const shouldStayReadable = isFBWWWBundle || isRNBundle || forcePrettyOutput ;
361
361
return [
362
362
// Extract error codes from invariant() messages into a file.
363
363
shouldExtractErrors && {
@@ -371,7 +371,7 @@ function getPlugins(
371
371
// Ensure we don't try to bundle any fbjs modules.
372
372
forbidFBJSImports ( ) ,
373
373
// Replace any externals with their valid internal FB mappings
374
- isFBBundle && replace ( Bundles . fbBundleExternalsMap ) ,
374
+ isFBWWWBundle && replace ( Bundles . fbBundleExternalsMap ) ,
375
375
// Use Node resolution mechanism.
376
376
resolve ( {
377
377
skip : externals ,
@@ -539,14 +539,19 @@ async function createBundle(bundle, bundleType) {
539
539
const format = getFormat ( bundleType ) ;
540
540
const packageName = Packaging . getPackageName ( bundle . entry ) ;
541
541
542
- const isFBBundle =
542
+ const isFBWWWBundle =
543
543
bundleType === FB_WWW_DEV ||
544
544
bundleType === FB_WWW_PROD ||
545
545
bundleType === FB_WWW_PROFILING ;
546
546
547
+ const isFBRNBundle =
548
+ bundleType === RN_FB_DEV ||
549
+ bundleType === RN_FB_PROD ||
550
+ bundleType === RN_FB_PROFILING ;
551
+
547
552
let resolvedEntry = resolveEntryFork (
548
553
require . resolve ( bundle . entry ) ,
549
- isFBBundle
554
+ isFBWWWBundle || isFBRNBundle
550
555
) ;
551
556
552
557
const shouldBundleDependencies =
@@ -559,7 +564,7 @@ async function createBundle(bundle, bundleType) {
559
564
const deps = Modules . getDependencies ( bundleType , bundle . entry ) ;
560
565
externals = externals . concat ( deps ) ;
561
566
}
562
- if ( isFBBundle ) {
567
+ if ( isFBWWWBundle ) {
563
568
// Add any mapped fb bundle externals
564
569
externals = externals . concat ( Object . values ( Bundles . fbBundleExternalsMap ) ) ;
565
570
}
0 commit comments