(moduleGraph, chunkGraph, chunk)
| 30 | * @returns {Module[]} all wasm modules |
| 31 | */ |
| 32 | const getAllWasmModules = (moduleGraph, chunkGraph, chunk) => { |
| 33 | const wasmModules = chunk.getAllAsyncChunks(); |
| 34 | /** @type {Module[]} */ |
| 35 | const array = []; |
| 36 | for (const chunk of wasmModules) { |
| 37 | for (const m of chunkGraph.getOrderedChunkModulesIterable( |
| 38 | chunk, |
| 39 | compareModulesByIdentifier |
| 40 | )) { |
| 41 | if (m.type.startsWith("webassembly")) { |
| 42 | array.push(m); |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | return array; |
| 48 | }; |
| 49 | |
| 50 | /** @typedef {string[]} Declarations */ |
| 51 |
no test coverage detected