@@ -25,6 +25,8 @@ const {asyncCopyTo, asyncRimRaf} = require('./utils');
25
25
const codeFrame = require ( 'babel-code-frame' ) ;
26
26
const Wrappers = require ( './wrappers' ) ;
27
27
28
+ const __EXPERIMENTAL__ = process . env . RELEASE_CHANNEL === 'experimental' ;
29
+
28
30
// Errors in promises should be fatal.
29
31
let loggedErrors = new Set ( ) ;
30
32
process . on ( 'unhandledRejection' , err => {
@@ -304,8 +306,7 @@ function getPlugins(
304
306
bundleType ,
305
307
globalName ,
306
308
moduleType ,
307
- pureExternalModules ,
308
- isExperimentalBuild
309
+ pureExternalModules
309
310
) {
310
311
const findAndRecordErrorCodes = extractErrorCodes ( errorCodeOpts ) ;
311
312
const forks = Modules . getForks ( bundleType , entry , moduleType ) ;
@@ -363,7 +364,7 @@ function getPlugins(
363
364
__PROFILE__ : isProfiling || ! isProduction ? 'true' : 'false' ,
364
365
__UMD__ : isUMDBundle ? 'true' : 'false' ,
365
366
'process.env.NODE_ENV' : isProduction ? "'production'" : "'development'" ,
366
- __EXPERIMENTAL__ : isExperimentalBuild ,
367
+ __EXPERIMENTAL__ ,
367
368
} ) ,
368
369
// We still need CommonJS for external deps like object-assign.
369
370
commonjs ( ) ,
@@ -487,8 +488,6 @@ async function createBundle(bundle, bundleType) {
487
488
module => ! importSideEffects [ module ]
488
489
) ;
489
490
490
- const isExperimentalBuild = process . env . RELEASE_CHANNEL === 'experimental' ;
491
-
492
491
const rollupConfig = {
493
492
input : resolvedEntry ,
494
493
treeshake : {
@@ -512,8 +511,7 @@ async function createBundle(bundle, bundleType) {
512
511
bundleType ,
513
512
bundle . global ,
514
513
bundle . moduleType ,
515
- pureExternalModules ,
516
- isExperimentalBuild
514
+ pureExternalModules
517
515
) ,
518
516
// We can't use getters in www.
519
517
legacy :
@@ -656,16 +654,22 @@ async function buildEverything() {
656
654
[ bundle , NODE_DEV ] ,
657
655
[ bundle , NODE_PROD ] ,
658
656
[ bundle , NODE_PROFILING ] ,
659
- [ bundle , FB_WWW_DEV ] ,
660
- [ bundle , FB_WWW_PROD ] ,
661
- [ bundle , FB_WWW_PROFILING ] ,
662
657
[ bundle , RN_OSS_DEV ] ,
663
658
[ bundle , RN_OSS_PROD ] ,
664
659
[ bundle , RN_OSS_PROFILING ] ,
665
660
[ bundle , RN_FB_DEV ] ,
666
661
[ bundle , RN_FB_PROD ] ,
667
662
[ bundle , RN_FB_PROFILING ]
668
663
) ;
664
+
665
+ if ( __EXPERIMENTAL__ ) {
666
+ // www uses experimental builds only.
667
+ bundles . push (
668
+ [ bundle , FB_WWW_DEV ] ,
669
+ [ bundle , FB_WWW_PROD ] ,
670
+ [ bundle , FB_WWW_PROFILING ]
671
+ ) ;
672
+ }
669
673
}
670
674
671
675
if ( ! shouldExtractErrors && process . env . CIRCLE_NODE_TOTAL ) {
0 commit comments