Add the ignoreOrder option to MiniCssExtractPlugin (#37140)

* Add the ignoreOrder option to MiniCssExtractPlugin

* Fix linting issues

* Update version number
This commit is contained in:
Spencer Miskoviak 2019-07-26 10:53:25 -07:00 committed by Wesley Wigham
parent 2b71012c26
commit b12a3052a7
2 changed files with 19 additions and 1 deletions

View File

@ -1,7 +1,8 @@
// Type definitions for mini-css-extract-plugin 0.2
// Type definitions for mini-css-extract-plugin 0.8
// Project: https://github.com/webpack-contrib/mini-css-extract-plugin
// Definitions by: JounQin <https://github.com/JounQin>
// Katsuya Hino <https://github.com/dobogo>
// Spencer Miskoviak <https://github.com/skovy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@ -27,6 +28,12 @@ declare namespace MiniCssExtractPlugin {
*/
filename?: string;
chunkFilename?: string;
/**
* For projects where CSS ordering has been mitigated through consistent
* use of scoping or naming conventions, the CSS order warnings can be
* disabled by setting this flag to true for the plugin.
*/
ignoreOrder?: boolean;
}
}

View File

@ -65,3 +65,14 @@ configuration = {
}),
],
};
configuration = {
// ...
plugins: [
new MiniCssExtractPlugin({
filename: 'styles.css',
chunkFilename: 'style.css',
ignoreOrder: true,
}),
],
};