Skip to content

Commit c958418

Browse files
authored
Merge pull request webpack#10837 from webpack/remove/finish-module-graph
remove logic to finish modules in module graph
2 parents f3ad975 + 93fddc0 commit c958418

File tree

3 files changed

+1
-28
lines changed

3 files changed

+1
-28
lines changed

lib/Compilation.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,10 +1521,7 @@ class Compilation {
15211521

15221522
finish(callback) {
15231523
this.logger.time("finish modules");
1524-
const { moduleGraph, modules } = this;
1525-
for (const module of modules) {
1526-
moduleGraph.finishModule(module);
1527-
}
1524+
const { modules } = this;
15281525
this.hooks.finishModules.callAsync(modules, err => {
15291526
this.logger.timeEnd("finish modules");
15301527
if (err) return callback(err);

lib/ModuleGraph.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -994,29 +994,6 @@ class ModuleGraph {
994994
return connection !== undefined ? connection.resolvedModule : null;
995995
}
996996

997-
/**
998-
* @param {Module} module a module
999-
* @returns {void}
1000-
*/
1001-
finishModule(module) {
1002-
/*if (module.buildMeta.exportsType === "default") {
1003-
const exportsInfo = this.getExportsInfo(module);
1004-
const defaultInfo = exportsInfo.getExportInfo("default");
1005-
defaultInfo.canMangleProvide = false;
1006-
defaultInfo.provided = true;
1007-
defaultInfo.usedName = SKIP_OVER_NAME;
1008-
if (module.buildMeta.defaultObject) {
1009-
const innerObject = defaultInfo.createNestedExportsInfo();
1010-
if (
1011-
module.buildMeta.defaultObject === "redirect" ||
1012-
module.buildMeta.defaultObject === "redirect-warn"
1013-
) {
1014-
exportsInfo.setRedirectNamedTo(innerObject);
1015-
}
1016-
}
1017-
}*/
1018-
}
1019-
1020997
/**
1021998
* @param {Dependency} dependency the dependency to look for a referenced module
1022999
* @returns {ModuleGraphConnection | undefined} the connection

types.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3683,7 +3683,6 @@ declare class ModuleGraph {
36833683
): void;
36843684
addExtraReason(module: Module, explanation: string): void;
36853685
getResolvedModule(dependency: Dependency): Module;
3686-
finishModule(module: Module): void;
36873686
getConnection(dependency: Dependency): ModuleGraphConnection;
36883687
getModule(dependency: Dependency): Module;
36893688
getOrigin(dependency: Dependency): Module;

0 commit comments

Comments
 (0)