File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ function getChunkEntryNames (chunk) {
3131 }
3232}
3333
34- const processedGroups = new Set ( ) ;
35- function getNames ( groups ) {
34+ function getNames ( groups , processed = new Set ( ) ) {
3635 const Entrypoint = require ( 'webpack/lib/Entrypoint' )
3736 const names = [ ]
3837 for ( const group of groups ) {
@@ -41,13 +40,12 @@ function getNames (groups) {
4140 if ( group . options . name ) {
4241 names . push ( group . options . name )
4342 }
44- }
45- else if ( ! processedGroups . has ( group ) ) {
46- processedGroups . add ( group ) ;
47- names . push ( ...getNames ( group . parentsIterable ) ) ;
43+ } else if ( ! processed . has ( group ) ) {
44+ processed . add ( group ) ;
45+ names . push ( ...getNames ( group . parentsIterable , processed ) )
4846 }
4947 }
50- return names
48+ return names ;
5149}
5250
5351function extractChunks ( { compilation, optionsInclude } ) {
You can’t perform that action at this time.
0 commit comments