File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed
Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ module.exports = {
5050 // Options similar to the same options in webpackOptions.output
5151 // both options are optional
5252 filename: " [name].css" ,
53- chunkFilename: " [id].css"
53+ chunkFilename: " [id].css" ,
54+ orderWarning: true // Disable to remove warnings about conflicting order
5455 })
5556 ],
5657 module: {
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ class MiniCssExtractPlugin {
113113 this . options = Object . assign (
114114 {
115115 filename : '[name].css' ,
116+ orderWarning : true ,
116117 } ,
117118 options
118119 ) ;
@@ -480,16 +481,20 @@ class MiniCssExtractPlugin {
480481 // use list with fewest failed deps
481482 // and emit a warning
482483 const fallbackModule = bestMatch . pop ( ) ;
483- compilation . warnings . push (
484- new Error (
485- `chunk ${ chunk . name || chunk . id } [mini-css-extract-plugin]\n` +
486- 'Conflicting order between:\n' +
487- ` * ${ fallbackModule . readableIdentifier ( requestShortener ) } \n` +
488- `${ bestMatchDeps
489- . map ( ( m ) => ` * ${ m . readableIdentifier ( requestShortener ) } ` )
490- . join ( '\n' ) } `
491- )
492- ) ;
484+ if ( this . options . orderWarning ) {
485+ compilation . warnings . push (
486+ new Error (
487+ `chunk ${ chunk . name || chunk . id } [mini-css-extract-plugin]\n` +
488+ 'Conflicting order between:\n' +
489+ ` * ${ fallbackModule . readableIdentifier (
490+ requestShortener
491+ ) } \n` +
492+ `${ bestMatchDeps
493+ . map ( ( m ) => ` * ${ m . readableIdentifier ( requestShortener ) } ` )
494+ . join ( '\n' ) } `
495+ )
496+ ) ;
497+ }
493498 usedModules . add ( fallbackModule ) ;
494499 }
495500 }
You can’t perform that action at this time.
0 commit comments