@@ -38,6 +38,7 @@ process.on('unhandledRejection', err => {
38
38
const {
39
39
UMD_DEV ,
40
40
UMD_PROD ,
41
+ UMD_PROFILING ,
41
42
NODE_DEV ,
42
43
NODE_PROD ,
43
44
NODE_PROFILING ,
@@ -113,6 +114,7 @@ function getBabelConfig(updateBabelOptions, bundleType, filename) {
113
114
} ) ;
114
115
case UMD_DEV :
115
116
case UMD_PROD :
117
+ case UMD_PROFILING :
116
118
case NODE_DEV :
117
119
case NODE_PROD :
118
120
case NODE_PROFILING :
@@ -158,6 +160,7 @@ function getFormat(bundleType) {
158
160
switch ( bundleType ) {
159
161
case UMD_DEV :
160
162
case UMD_PROD :
163
+ case UMD_PROFILING :
161
164
return `umd` ;
162
165
case NODE_DEV :
163
166
case NODE_PROD :
@@ -183,6 +186,8 @@ function getFilename(name, globalName, bundleType) {
183
186
return `${ name } .development.js` ;
184
187
case UMD_PROD :
185
188
return `${ name } .production.min.js` ;
189
+ case UMD_PROFILING :
190
+ return `${ name } .profiling.min.js` ;
186
191
case NODE_DEV :
187
192
return `${ name } .development.js` ;
188
193
case NODE_PROD :
@@ -214,6 +219,7 @@ function isProductionBundleType(bundleType) {
214
219
return false ;
215
220
case UMD_PROD :
216
221
case NODE_PROD :
222
+ case UMD_PROFILING :
217
223
case NODE_PROFILING :
218
224
case FB_WWW_PROD :
219
225
case FB_WWW_PROFILING :
@@ -244,6 +250,7 @@ function isProfilingBundleType(bundleType) {
244
250
case NODE_PROFILING :
245
251
case RN_FB_PROFILING :
246
252
case RN_OSS_PROFILING :
253
+ case UMD_PROFILING :
247
254
return true ;
248
255
default :
249
256
throw new Error ( `Unknown type: ${ bundleType } ` ) ;
@@ -280,7 +287,10 @@ function getPlugins(
280
287
const forks = Modules . getForks ( bundleType , entry , moduleType ) ;
281
288
const isProduction = isProductionBundleType ( bundleType ) ;
282
289
const isProfiling = isProfilingBundleType ( bundleType ) ;
283
- const isUMDBundle = bundleType === UMD_DEV || bundleType === UMD_PROD ;
290
+ const isUMDBundle =
291
+ bundleType === UMD_DEV ||
292
+ bundleType === UMD_PROD ||
293
+ bundleType === UMD_PROFILING ;
284
294
const isFBBundle =
285
295
bundleType === FB_WWW_DEV ||
286
296
bundleType === FB_WWW_PROD ||
@@ -430,7 +440,9 @@ async function createBundle(bundle, bundleType) {
430
440
}
431
441
432
442
const shouldBundleDependencies =
433
- bundleType === UMD_DEV || bundleType === UMD_PROD ;
443
+ bundleType === UMD_DEV ||
444
+ bundleType === UMD_PROD ||
445
+ bundleType === UMD_PROFILING ;
434
446
const peerGlobals = Modules . getPeerGlobals ( bundle . externals , bundleType ) ;
435
447
let externals = Object . keys ( peerGlobals ) ;
436
448
if ( ! shouldBundleDependencies ) {
@@ -580,6 +592,7 @@ async function buildEverything() {
580
592
for ( const bundle of Bundles . bundles ) {
581
593
await createBundle ( bundle , UMD_DEV ) ;
582
594
await createBundle ( bundle , UMD_PROD ) ;
595
+ await createBundle ( bundle , UMD_PROFILING ) ;
583
596
await createBundle ( bundle , NODE_DEV ) ;
584
597
await createBundle ( bundle , NODE_PROD ) ;
585
598
await createBundle ( bundle , NODE_PROFILING ) ;
0 commit comments