File tree 2 files changed +9
-4
lines changed
test/cases/runtime/expected/webpack-5
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -477,10 +477,15 @@ class MiniCssExtractPlugin {
477
477
MODULE_TYPE ,
478
478
'mini-css' ,
479
479
`${ webpack . RuntimeGlobals . require } .miniCssF` ,
480
- ( referencedChunk ) =>
481
- referencedChunk . canBeInitial ( )
480
+ ( referencedChunk ) => {
481
+ if ( ! referencedChunk . contentHash [ MODULE_TYPE ] ) {
482
+ return '' ;
483
+ }
484
+
485
+ return referencedChunk . canBeInitial ( )
482
486
? this . options . filename
483
- : this . options . chunkFilename ,
487
+ : this . options . chunkFilename ;
488
+ } ,
484
489
true
485
490
)
486
491
) ;
Original file line number Diff line number Diff line change 101
101
/******/ // This function allow to reference all chunks
102
102
/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
103
103
/******/ // return url for filenames based on template
104
- /******/ return "" + ( { "0" : " main", "1" : "runtime~main" } [ chunkId ] || chunkId ) + "." + { "0" : " a7263f8f763dcf4051bc"} [ chunkId ] + ".css" ;
104
+ /******/ return "" + " main" + "." + " a7263f8f763dcf4051bc" + ".css" ;
105
105
/******/ } ;
106
106
/******/ } ) ( ) ;
107
107
/******/
You can’t perform that action at this time.
0 commit comments