$ cnpm install webpack-filter-warnings-plugin
Allows you to hide certain warnings from webpack compilations
npm i -D webpack-filter-warnings-plugin
// webpack.config.js
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
module.exports = {
// ... rest of webpack config
plugins: [
new FilterWarningsPlugin({
exclude: /any-warnings-matching-this-will-be-hidden/
})
]
}
Currently karma-webpack does not respect the stats.warningsFilter option. Also when excluding all warnings, webpack still says Compiled with warnings.
when all warnings are filtere. Hopefully this plugin will no longer need to exist one day.
MIT
Copyright 2013 - present © cnpmjs.org