@@ -38,6 +38,7 @@ process.on('unhandledRejection', err => {
3838const {
3939 UMD_DEV ,
4040 UMD_PROD ,
41+ UMD_PROFILING ,
4142 NODE_DEV ,
4243 NODE_PROD ,
4344 NODE_PROFILING ,
@@ -113,6 +114,7 @@ function getBabelConfig(updateBabelOptions, bundleType, filename) {
113114 } ) ;
114115 case UMD_DEV :
115116 case UMD_PROD :
117+ case UMD_PROFILING :
116118 case NODE_DEV :
117119 case NODE_PROD :
118120 case NODE_PROFILING :
@@ -158,6 +160,7 @@ function getFormat(bundleType) {
158160 switch ( bundleType ) {
159161 case UMD_DEV :
160162 case UMD_PROD :
163+ case UMD_PROFILING :
161164 return `umd` ;
162165 case NODE_DEV :
163166 case NODE_PROD :
@@ -183,6 +186,8 @@ function getFilename(name, globalName, bundleType) {
183186 return `${ name } .development.js` ;
184187 case UMD_PROD :
185188 return `${ name } .production.min.js` ;
189+ case UMD_PROFILING :
190+ return `${ name } .profiling.min.js` ;
186191 case NODE_DEV :
187192 return `${ name } .development.js` ;
188193 case NODE_PROD :
@@ -214,6 +219,7 @@ function isProductionBundleType(bundleType) {
214219 return false ;
215220 case UMD_PROD :
216221 case NODE_PROD :
222+ case UMD_PROFILING :
217223 case NODE_PROFILING :
218224 case FB_WWW_PROD :
219225 case FB_WWW_PROFILING :
@@ -244,6 +250,7 @@ function isProfilingBundleType(bundleType) {
244250 case NODE_PROFILING :
245251 case RN_FB_PROFILING :
246252 case RN_OSS_PROFILING :
253+ case UMD_PROFILING :
247254 return true ;
248255 default :
249256 throw new Error ( `Unknown type: ${ bundleType } ` ) ;
@@ -280,7 +287,10 @@ function getPlugins(
280287 const forks = Modules . getForks ( bundleType , entry , moduleType ) ;
281288 const isProduction = isProductionBundleType ( bundleType ) ;
282289 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 ;
284294 const isFBBundle =
285295 bundleType === FB_WWW_DEV ||
286296 bundleType === FB_WWW_PROD ||
@@ -430,7 +440,9 @@ async function createBundle(bundle, bundleType) {
430440 }
431441
432442 const shouldBundleDependencies =
433- bundleType === UMD_DEV || bundleType === UMD_PROD ;
443+ bundleType === UMD_DEV ||
444+ bundleType === UMD_PROD ||
445+ bundleType === UMD_PROFILING ;
434446 const peerGlobals = Modules . getPeerGlobals ( bundle . externals , bundleType ) ;
435447 let externals = Object . keys ( peerGlobals ) ;
436448 if ( ! shouldBundleDependencies ) {
@@ -580,6 +592,7 @@ async function buildEverything() {
580592 for ( const bundle of Bundles . bundles ) {
581593 await createBundle ( bundle , UMD_DEV ) ;
582594 await createBundle ( bundle , UMD_PROD ) ;
595+ await createBundle ( bundle , UMD_PROFILING ) ;
583596 await createBundle ( bundle , NODE_DEV ) ;
584597 await createBundle ( bundle , NODE_PROD ) ;
585598 await createBundle ( bundle , NODE_PROFILING ) ;
0 commit comments