File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -269,8 +269,9 @@ class MiniCssExtractPlugin {
269
269
mainTemplate . hooks . requireEnsure . tap (
270
270
pluginName ,
271
271
( source , chunk , hash ) => {
272
- console . log ( 'Here is the source in requireEnsure:: ' , source ) ;
273
- /*
272
+ // if disableAsync option is set, don't fetch css
273
+ if ( this . options . disableAsync ) return null ;
274
+
274
275
const chunkMap = this . getCssChunkObject ( chunk ) ;
275
276
if ( Object . keys ( chunkMap ) . length > 0 ) {
276
277
const chunkMaps = chunk . getChunkMaps ( ) ;
@@ -390,18 +391,16 @@ class MiniCssExtractPlugin {
390
391
'}' ,
391
392
] ) ;
392
393
}
393
- */
394
+
394
395
return source ;
395
396
}
396
397
) ;
397
398
} ) ;
398
399
}
399
400
400
401
getCssChunkObject ( mainChunk ) {
401
- console . log ( 'Here is the mainChunk:: ' , mainChunk ) ;
402
402
const obj = { } ;
403
403
for ( const chunk of mainChunk . getAllAsyncChunks ( ) ) {
404
- console . log ( 'here is the individual chunk:: ' , chunk ) ;
405
404
for ( const module of chunk . modulesIterable ) {
406
405
if ( module . type === MODULE_TYPE ) {
407
406
obj [ chunk . id ] = 1 ;
You can’t perform that action at this time.
0 commit comments