Skip to content

Commit

Permalink
Add the ignoreOrder option to MiniCssExtractPlugin (DefinitelyTyped#3…
Browse files Browse the repository at this point in the history
…7140)

* Add the ignoreOrder option to MiniCssExtractPlugin

* Fix linting issues

* Update version number
  • Loading branch information
skovy authored and breeze9527 committed Jan 27, 2020
1 parent 433e097 commit e8a6177
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 8 additions & 1 deletion types/mini-css-extract-plugin/index.d.ts
@@ -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

Expand All @@ -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;
}
}

Expand Down
11 changes: 11 additions & 0 deletions types/mini-css-extract-plugin/mini-css-extract-plugin-tests.ts
Expand Up @@ -65,3 +65,14 @@ configuration = {
}),
],
};

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

0 comments on commit e8a6177

Please sign in to comment.