File tree 2 files changed +15
-12
lines changed
2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ module.exports = {
90
90
// both options are optional
91
91
filename: " [name].css" ,
92
92
chunkFilename: " [id].css" ,
93
- hot: true // optional as the plugin cannot automatically detect if you are using HOT, not for production use
93
+ hot: true , // optional as the plugin cannot automatically detect if you are using HOT, not for production use
94
+ orderWarning: true , // Disable to remove warnings about conflicting order between imports
94
95
}
95
96
),
96
97
]
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class CssModuleFactory {
128
128
129
129
class ExtractCssChunks {
130
130
constructor ( options ) {
131
- this . options = Object . assign ( { filename : '[name].css' } , options ) ;
131
+ this . options = Object . assign ( { filename : '[name].css' , orderWarning : true } , options ) ;
132
132
const { cssModules, reloadAll } = this . options ;
133
133
134
134
if ( ! this . options . chunkFilename ) {
@@ -523,16 +523,18 @@ class ExtractCssChunks {
523
523
// use list with fewest failed deps
524
524
// and emit a warning
525
525
const fallbackModule = bestMatch . pop ( ) ;
526
- compilation . warnings . push (
527
- new Error (
528
- `chunk ${ chunk . name || chunk . id } [mini-css-extract-plugin]\n` +
529
- 'Conflicting order between:\n' +
530
- ` * ${ fallbackModule . readableIdentifier ( requestShortener ) } \n` +
531
- `${ bestMatchDeps
532
- . map ( m => ` * ${ m . readableIdentifier ( requestShortener ) } ` )
533
- . join ( '\n' ) } `,
534
- ) ,
535
- ) ;
526
+ if ( this . options . orderWarning ) {
527
+ compilation . warnings . push (
528
+ new Error (
529
+ `chunk ${ chunk . name || chunk . id } [mini-css-extract-plugin]\n` +
530
+ 'Conflicting order between:\n' +
531
+ ` * ${ fallbackModule . readableIdentifier ( requestShortener ) } \n` +
532
+ `${ bestMatchDeps
533
+ . map ( m => ` * ${ m . readableIdentifier ( requestShortener ) } ` )
534
+ . join ( '\n' ) } `,
535
+ ) ,
536
+ ) ;
537
+ }
536
538
usedModules . add ( fallbackModule ) ;
537
539
}
538
540
}
You can’t perform that action at this time.
0 commit comments