| 1333 | deepFreeze(moduleTypes); |
| 1334 | |
| 1335 | function getFilename(bundle, bundleType) { |
| 1336 | let name = bundle.name || bundle.entry; |
| 1337 | const globalName = bundle.global; |
| 1338 | // we do this to replace / to -, for react-dom/server |
| 1339 | name = name.replace('/index.', '.').replace('/', '-'); |
| 1340 | switch (bundleType) { |
| 1341 | case NODE_ES2015: |
| 1342 | return `${name}.js`; |
| 1343 | case BUN_DEV: |
| 1344 | return `${name}.development.js`; |
| 1345 | case BUN_PROD: |
| 1346 | return `${name}.production.js`; |
| 1347 | case ESM_DEV: |
| 1348 | return `${name}.development.js`; |
| 1349 | case ESM_PROD: |
| 1350 | return `${name}.production.js`; |
| 1351 | case NODE_DEV: |
| 1352 | return `${name}.development.js`; |
| 1353 | case NODE_PROD: |
| 1354 | return `${name}.production.js`; |
| 1355 | case NODE_PROFILING: |
| 1356 | return `${name}.profiling.js`; |
| 1357 | case FB_WWW_DEV: |
| 1358 | case RN_OSS_DEV: |
| 1359 | case RN_FB_DEV: |
| 1360 | return `${globalName}-dev.js`; |
| 1361 | case FB_WWW_PROD: |
| 1362 | case RN_OSS_PROD: |
| 1363 | case RN_FB_PROD: |
| 1364 | return `${globalName}-prod.js`; |
| 1365 | case FB_WWW_PROFILING: |
| 1366 | case RN_FB_PROFILING: |
| 1367 | case RN_OSS_PROFILING: |
| 1368 | return `${globalName}-profiling.js`; |
| 1369 | case BROWSER_SCRIPT: |
| 1370 | return `${name}.js`; |
| 1371 | case CJS_DTS: |
| 1372 | case ESM_DTS: |
| 1373 | return `${name}.d.ts`; |
| 1374 | } |
| 1375 | } |
| 1376 | |
| 1377 | let activeBundles = bundles; |
| 1378 | if (process.env.BUNDLES_FILTER != null) { |