mirror of https://github.com/webpack/webpack.git
remove unnecessary copy of modules
This commit is contained in:
parent
a3c166109e
commit
4eecad3a83
|
|
@ -423,15 +423,13 @@ class ConcatenatedModule extends Module {
|
|||
this._numberOfConcatenatedModules = modules.size;
|
||||
|
||||
// Graph
|
||||
const modulesSet = new Set(modules);
|
||||
|
||||
this.dependencies = [];
|
||||
|
||||
this.warnings = [];
|
||||
this.errors = [];
|
||||
this._orderedConcatenationList = ConcatenatedModule._createConcatenationList(
|
||||
rootModule,
|
||||
modulesSet,
|
||||
modules,
|
||||
compilation
|
||||
);
|
||||
for (const info of this._orderedConcatenationList) {
|
||||
|
|
@ -442,7 +440,7 @@ class ConcatenatedModule extends Module {
|
|||
for (const d of m.dependencies.filter(
|
||||
dep =>
|
||||
!(dep instanceof HarmonyImportDependency) ||
|
||||
!modulesSet.has(compilation.moduleGraph.getModule(dep))
|
||||
!modules.has(compilation.moduleGraph.getModule(dep))
|
||||
)) {
|
||||
this.dependencies.push(d);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue