File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -199,13 +199,16 @@ module.exports = class MainTemplate extends Template {
199199
200200 entryPointInChildren ( chunk ) {
201201 const checkChildren = ( chunk , alreadyCheckedChunks ) => {
202- return chunk . chunks . some ( ( child ) => {
203- if ( alreadyCheckedChunks . indexOf ( child ) >= 0 ) return ;
204- alreadyCheckedChunks . push ( child ) ;
205- return child . hasEntryModule ( ) || checkChildren ( child , alreadyCheckedChunks ) ;
206- } ) ;
202+ for ( const child of chunk . getChunks ( ) ) {
203+ if ( ! alreadyCheckedChunks . has ( child ) ) {
204+ alreadyCheckedChunks . add ( child ) ;
205+ if ( child . hasEntryModule ( ) || checkChildren ( child , alreadyCheckedChunks ) ) {
206+ return true ;
207+ }
208+ }
209+ }
207210 } ;
208- return checkChildren ( chunk , [ ] ) ;
211+ return checkChildren ( chunk , new Set ( ) ) === true ;
209212 }
210213
211214 getPublicPath ( options ) {
You can’t perform that action at this time.
0 commit comments