(chunk, chunkGraph)
| 157 | * @returns {boolean} true, when a JS file is needed for this chunk |
| 158 | */ |
| 159 | const _chunkHasJs = (chunk, chunkGraph) => { |
| 160 | if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { |
| 161 | for (const module of chunkGraph.getChunkEntryModulesIterable(chunk)) { |
| 162 | if (chunkGraph.getModuleSourceTypes(module).has(JAVASCRIPT_TYPE)) { |
| 163 | return true; |
| 164 | } |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | return Boolean( |
| 169 | chunkGraph.getChunkModulesIterableBySourceType(chunk, JAVASCRIPT_TYPE) |
| 170 | ); |
| 171 | }; |
| 172 | |
| 173 | /** |
| 174 | * Returns true, when a JS file is needed for this chunk. |
no test coverage detected