(chunks, moduleIds, final)
| 61 | * @param {boolean=} final true when final, otherwise false |
| 62 | */ |
| 63 | const outputCombination = (chunks, moduleIds, final) => { |
| 64 | if (chunks.size === 0) { |
| 65 | runtime.push( |
| 66 | `${final ? EXPORT_PREFIX : ""}(${moduleIds.map(runModule).join(", ")});` |
| 67 | ); |
| 68 | } else { |
| 69 | const fn = runtimeTemplate.returningFunction( |
| 70 | moduleIds.map(runModule).join(", ") |
| 71 | ); |
| 72 | runtime.push( |
| 73 | `${final && !passive ? EXPORT_PREFIX : ""}${ |
| 74 | passive |
| 75 | ? RuntimeGlobals.onChunksLoaded |
| 76 | : RuntimeGlobals.startupEntrypoint |
| 77 | }(0, ${JSON.stringify(Array.from(chunks, (c) => c.id))}, ${fn});` |
| 78 | ); |
| 79 | if (final && passive) { |
| 80 | runtime.push(`${EXPORT_PREFIX}${RuntimeGlobals.onChunksLoaded}();`); |
| 81 | } |
| 82 | } |
| 83 | }; |
| 84 | |
| 85 | /** @type {Chunks | undefined} */ |
| 86 | let currentChunks; |
no test coverage detected