* Collects the export names a dependency group requests from its target. * @param {Dependency[]} dependencies dependency group resolving to one module * @returns {Set<string> | true} requested export names, true for all
(dependencies)
| 42 | * @returns {Set<string> | true} requested export names, true for all |
| 43 | */ |
| 44 | function getForwardedIds(dependencies) { |
| 45 | /** @type {Set<string>} */ |
| 46 | const ids = new Set(); |
| 47 | for (const dependency of dependencies) { |
| 48 | // TODO remove in webpack 6 |
| 49 | // It may be missing on custom dependency types not extending the base Dependency |
| 50 | if (!("getForwardId" in dependency)) continue; |
| 51 | |
| 52 | const id = dependency.getForwardId(); |
| 53 | if (id === true) return true; |
| 54 | if (id !== null) ids.add(id); |
| 55 | } |
| 56 | return ids; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Tracks the deferred (not yet factorized/built) dependencies of a |
no test coverage detected