File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed
insert-function/expected/webpack-5
insert-string/expected/webpack-5
insert-undefined/expected/webpack-5
runtime/expected/webpack-5 Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -477,10 +477,15 @@ class MiniCssExtractPlugin {
477477 MODULE_TYPE ,
478478 'mini-css' ,
479479 `${ webpack . RuntimeGlobals . require } .miniCssF` ,
480- ( referencedChunk ) =>
481- referencedChunk . canBeInitial ( )
480+ ( referencedChunk ) => {
481+ if ( ! referencedChunk . contentHash [ MODULE_TYPE ] ) {
482+ return false ;
483+ }
484+
485+ return referencedChunk . canBeInitial ( )
482486 ? this . options . filename
483- : this . options . chunkFilename ,
487+ : this . options . chunkFilename ;
488+ } ,
484489 true
485490 )
486491 ) ;
Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ module.exports = function (urlString) {
358358/******/ // This function allow to reference all chunks
359359/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
360360/******/ // return url for filenames based on template
361- /******/ return "" + "main" + ".css" ;
361+ /******/ return undefined ;
362362/******/ } ;
363363/******/ } ) ( ) ;
364364/******/
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Self from '../../../src';
44
55module . exports = {
66 entry : './index.css' ,
7+ mode : 'development' ,
78 module : {
89 rules : [
910 {
Original file line number Diff line number Diff line change 5454/******/ ( ( ) => {
5555/******/ // This function allow to reference all chunks
5656/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
57- /******/ // return url for filenames not based on template
58- /******/ if ( chunkId === 1 ) return "1.css" ;
5957/******/ // return url for filenames based on template
60- /******/ return "" + "main" + ".css" ;
58+ /******/ return "" + chunkId + ".css" ;
6159/******/ } ;
6260/******/ } ) ( ) ;
6361/******/
Original file line number Diff line number Diff line change 5454/******/ ( ( ) => {
5555/******/ // This function allow to reference all chunks
5656/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
57- /******/ // return url for filenames not based on template
58- /******/ if ( chunkId === 1 ) return "1.css" ;
5957/******/ // return url for filenames based on template
60- /******/ return "" + "main" + ".css" ;
58+ /******/ return "" + chunkId + ".css" ;
6159/******/ } ;
6260/******/ } ) ( ) ;
6361/******/
Original file line number Diff line number Diff line change 5454/******/ ( ( ) => {
5555/******/ // This function allow to reference all chunks
5656/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
57- /******/ // return url for filenames not based on template
58- /******/ if ( chunkId === 1 ) return "1.css" ;
5957/******/ // return url for filenames based on template
60- /******/ return "" + "main" + ".css" ;
58+ /******/ return "" + chunkId + ".css" ;
6159/******/ } ;
6260/******/ } ) ( ) ;
6361/******/
Original file line number Diff line number Diff line change 101101/******/ // This function allow to reference all chunks
102102/******/ __webpack_require__ . miniCssF = ( chunkId ) => {
103103/******/ // 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" ;
105105/******/ } ;
106106/******/ } ) ( ) ;
107107/******/
You can’t perform that action at this time.
0 commit comments