We use CSS modules, so it doesn’t make sense to care about importing order, but the mini-css-extract-plugin
doesn’t provide an option to turn off the conflicting warning:
chunk styles [mini-css-extract-plugin]
Conflicting order between:
* css ...
* css ...
Here’s how to mute them.
First, install webpack-filter-warnings-plugin
:
npm i webpack-filter-warnings-plugin --save-dev
Then in your Webpack config, add this plugin (the below example is for NextJS, but normal Webpack config works the same way):
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin')
...
config.plugins.push(
new FilterWarningsPlugin({
exclude: /mini-css-extract-plugin[^]*Conflicting order between:/,
}),
)
Thank you! I had started to ignore the warnings, but it’s grown to a point where it takes up my whole terminal.