File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed
Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ module.exports = {
9090 // both options are optional
9191 filename: " [name].css" ,
9292 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
9495 }
9596 ),
9697 ]
Original file line number Diff line number Diff line change 11{
22 "name" : " extract-css-chunks-webpack-plugin" ,
3- "version" : " 3.1.2 " ,
3+ "version" : " 3.1.3 " ,
44 "author" : " James Gillmore <james@faceyspacey.com>" ,
55 "contributors" : [
66 " Zack Jackson <zack@ScriptedAlchemy.com> (https://github.com/ScriptedAlchemy)"
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class CssModuleFactory {
128128
129129class ExtractCssChunks {
130130 constructor ( options ) {
131- this . options = Object . assign ( { filename : '[name].css' } , options ) ;
131+ this . options = Object . assign ( { filename : '[name].css' , orderWarning : true } , options ) ;
132132 const { cssModules, reloadAll } = this . options ;
133133
134134 if ( ! this . options . chunkFilename ) {
@@ -523,16 +523,18 @@ class ExtractCssChunks {
523523 // use list with fewest failed deps
524524 // and emit a warning
525525 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+ }
536538 usedModules . add ( fallbackModule ) ;
537539 }
538540 }
You can’t perform that action at this time.
0 commit comments