(chunk, chunkGraph)
| 230 | * @returns {boolean} true if the chunk emits a `.js` file |
| 231 | */ |
| 232 | const chunkHasJs = (chunk, chunkGraph) => { |
| 233 | if (chunk.hasRuntime()) return true; |
| 234 | if (chunkGraph.getNumberOfEntryModules(chunk) > 0) { |
| 235 | for (const module of chunkGraph.getChunkEntryModulesIterable(chunk)) { |
| 236 | if (chunkGraph.getModuleSourceTypes(module).has(JAVASCRIPT_TYPE)) { |
| 237 | return true; |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | return Boolean( |
| 242 | chunkGraph.getChunkModulesIterableBySourceType(chunk, JAVASCRIPT_TYPE) |
| 243 | ); |
| 244 | }; |
| 245 | |
| 246 | /** |
| 247 | * Whether webpack will emit a `.css` file for this chunk that must be |
no test coverage detected