@@ -136,9 +136,7 @@ class ModuleConcatenationPlugin {
136136 for ( const concatConfiguration of concatConfigurations ) {
137137 if ( usedModules . has ( concatConfiguration . rootModule ) )
138138 continue ;
139- const orderedModules = new Set ( ) ;
140- this . addInOrder ( concatConfiguration . rootModule , concatConfiguration . modules , orderedModules ) ;
141- const newModule = new ConcatenatedModule ( concatConfiguration . rootModule , Array . from ( orderedModules ) ) ;
139+ const newModule = new ConcatenatedModule ( concatConfiguration . rootModule , Array . from ( concatConfiguration . modules ) ) ;
142140 concatConfiguration . sortWarnings ( ) ;
143141 for ( const warning of concatConfiguration . warnings ) {
144142 newModule . optimizationBailout . push ( ( requestShortener ) => {
@@ -151,7 +149,7 @@ class ModuleConcatenationPlugin {
151149 } ) ;
152150 }
153151 const chunks = concatConfiguration . rootModule . getChunks ( ) ;
154- for ( const m of orderedModules ) {
152+ for ( const m of concatConfiguration . modules ) {
155153 usedModules . add ( m ) ;
156154 chunks . forEach ( chunk => chunk . removeModule ( m ) ) ;
157155 }
@@ -247,16 +245,6 @@ class ModuleConcatenationPlugin {
247245 config . set ( testConfig ) ;
248246 return null ;
249247 }
250-
251- addInOrder ( module , unorderedSet , orderedSet ) {
252- if ( orderedSet . has ( module ) ) return ;
253- if ( ! unorderedSet . has ( module ) ) return ;
254- orderedSet . add ( module ) ;
255- for ( const imp of this . getImports ( module ) )
256- this . addInOrder ( imp , unorderedSet , orderedSet ) ;
257- orderedSet . delete ( module ) ;
258- orderedSet . add ( module ) ;
259- }
260248}
261249
262250class ConcatConfiguration {
0 commit comments