* Sets resolved module. * @param {Module | null} originModule the referencing module * @param {Dependency} dependency the referencing dependency * @param {Module} module the referenced module * @returns {void}
(originModule, dependency, module)
| 257 | * @returns {void} |
| 258 | */ |
| 259 | setResolvedModule(originModule, dependency, module) { |
| 260 | const connection = new ModuleGraphConnection( |
| 261 | originModule, |
| 262 | dependency, |
| 263 | module, |
| 264 | undefined, |
| 265 | class="cm">// weak is defined on ModuleDependency; undefined for other dependency kinds |
| 266 | /** @type {{ weak?: boolean }} */ (dependency).weak, |
| 267 | dependency.getCondition(this) |
| 268 | ); |
| 269 | const connections = this._getModuleGraphModule(module).incomingConnections; |
| 270 | connections.add(connection); |
| 271 | if (originModule) { |
| 272 | const mgm = this._getModuleGraphModule(originModule); |
| 273 | if (mgm._unassignedConnections === undefined) { |
| 274 | mgm._unassignedConnections = []; |
| 275 | } |
| 276 | mgm._unassignedConnections.push(connection); |
| 277 | if (mgm.outgoingConnections === undefined) { |
| 278 | mgm.outgoingConnections = new SortableSet(); |
| 279 | } |
| 280 | mgm.outgoingConnections.add(connection); |
| 281 | } else { |
| 282 | this._dependencyMap.set(dependency, connection); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Updates module using the provided dependency. |
no test coverage detected